From e4feddf5198f1c9d45a6c34a95b251df773ab6db Mon Sep 17 00:00:00 2001 From: Haru Date: Wed, 20 Apr 2016 15:40:19 +0200 Subject: Corrected the type of the 'length' argument of various broadcast-related functions - Variable types were changed to int - Corrects several warnings in VS2015 - Affected functions: `clif->broadcast()`, `clif->broadcast2()`, `intif->broadcast()`, `intif->broadcast2()` Signed-off-by: Haru --- src/map/atcommand.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/map/atcommand.c') diff --git a/src/map/atcommand.c b/src/map/atcommand.c index 595cb8567..32ca2f384 100644 --- a/src/map/atcommand.c +++ b/src/map/atcommand.c @@ -1091,9 +1091,9 @@ ACMD(kami) sscanf(message, "%199[^\n]", atcmd_output); if (stristr(info->command, "l") != NULL) - clif->broadcast(&sd->bl, atcmd_output, strlen(atcmd_output) + 1, BC_DEFAULT, ALL_SAMEMAP); + clif->broadcast(&sd->bl, atcmd_output, (int)strlen(atcmd_output) + 1, BC_DEFAULT, ALL_SAMEMAP); else - intif->broadcast(atcmd_output, strlen(atcmd_output) + 1, (*(info->command + 4) == 'b' || *(info->command + 4) == 'B') ? BC_BLUE : BC_YELLOW); + intif->broadcast(atcmd_output, (int)strlen(atcmd_output) + 1, (*(info->command + 4) == 'b' || *(info->command + 4) == 'B') ? BC_BLUE : BC_YELLOW); } else { if(!*message || (sscanf(message, "%10u %199[^\n]", &color, atcmd_output) < 2)) { clif->message(fd, msg_fd(fd,981)); // Please enter color and message (usage: @kamic ). @@ -1104,7 +1104,7 @@ ACMD(kami) clif->message(fd, msg_fd(fd,982)); // Invalid color. return false; } - intif->broadcast2(atcmd_output, strlen(atcmd_output) + 1, color, 0x190, 12, 0, 0); + intif->broadcast2(atcmd_output, (int)strlen(atcmd_output) + 1, color, 0x190, 12, 0, 0); } return true; } @@ -4911,7 +4911,7 @@ ACMD(broadcast) } safesnprintf(atcmd_output, sizeof(atcmd_output), "%s: %s", sd->status.name, message); - intif->broadcast(atcmd_output, strlen(atcmd_output) + 1, BC_DEFAULT); + intif->broadcast(atcmd_output, (int)strlen(atcmd_output) + 1, BC_DEFAULT); return true; } @@ -4930,7 +4930,7 @@ ACMD(localbroadcast) safesnprintf(atcmd_output, sizeof(atcmd_output), "%s: %s", sd->status.name, message); - clif->broadcast(&sd->bl, atcmd_output, strlen(atcmd_output) + 1, BC_DEFAULT, ALL_SAMEMAP); + clif->broadcast(&sd->bl, atcmd_output, (int)strlen(atcmd_output) + 1, BC_DEFAULT, ALL_SAMEMAP); return true; } -- cgit v1.2.3-60-g2f50