From 88df42a60fbe2007524b04e425941df8270dda8a Mon Sep 17 00:00:00 2001 From: navi <87298770+BMingSY@users.noreply.github.com> Date: Thu, 26 Dec 2024 17:29:48 +0800 Subject: [PATCH] =?UTF-8?q?fix=20message=E6=95=B0=E9=87=8F=E8=BF=87?= =?UTF-8?q?=E5=A4=9A=E5=AF=BC=E8=87=B4int=E6=BA=A2=E5=87=BA=20(#2014)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: 角弓 --- skynet-src/skynet_server.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/skynet-src/skynet_server.c b/skynet-src/skynet_server.c index 9f2a3593b..a07f51ff9 100644 --- a/skynet-src/skynet_server.c +++ b/skynet-src/skynet_server.c @@ -52,7 +52,7 @@ struct skynet_context { uint32_t handle; int session_id; ATOM_INT ref; - int message_count; + size_t message_count; bool init; bool endless; bool profile; @@ -574,7 +574,7 @@ cmd_stat(struct skynet_context * context, const char * param) { strcpy(context->result, "0"); } } else if (strcmp(param, "message") == 0) { - sprintf(context->result, "%d", context->message_count); + sprintf(context->result, "%zu", context->message_count); } else { context->result[0] = '\0'; }