summaryrefslogtreecommitdiff
path: root/src/map/atcommand.c
diff options
context:
space:
mode:
authorHaru <haru@dotalux.com>2016-04-20 15:40:19 +0200
committerHaru <haru@dotalux.com>2016-04-23 19:08:11 +0200
commite4feddf5198f1c9d45a6c34a95b251df773ab6db (patch)
tree7d6fb02f933f6772851f375f7c176bd2f32a617f /src/map/atcommand.c
parentdc23fd3ee6029efe881fa73ed9f4f85e4548bc59 (diff)
downloadhercules-e4feddf5198f1c9d45a6c34a95b251df773ab6db.tar.gz
hercules-e4feddf5198f1c9d45a6c34a95b251df773ab6db.tar.bz2
hercules-e4feddf5198f1c9d45a6c34a95b251df773ab6db.tar.xz
hercules-e4feddf5198f1c9d45a6c34a95b251df773ab6db.zip
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 <haru@dotalux.com>
Diffstat (limited to 'src/map/atcommand.c')
-rw-r--r--src/map/atcommand.c10
1 files changed, 5 insertions, 5 deletions
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 <color> <message>).
@@ -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;
}