diff options
author | Haru <haru@dotalux.com> | 2016-04-19 16:31:57 +0200 |
---|---|---|
committer | Haru <haru@dotalux.com> | 2016-04-23 18:51:58 +0200 |
commit | dc23fd3ee6029efe881fa73ed9f4f85e4548bc59 (patch) | |
tree | dde4a3e3ffd479babb4e6db3fa830dad23463281 /src/map/intif.c | |
parent | 2b1dce1e4acf46941657cab6da008c774f52de7c (diff) | |
download | hercules-dc23fd3ee6029efe881fa73ed9f4f85e4548bc59.tar.gz hercules-dc23fd3ee6029efe881fa73ed9f4f85e4548bc59.tar.bz2 hercules-dc23fd3ee6029efe881fa73ed9f4f85e4548bc59.tar.xz hercules-dc23fd3ee6029efe881fa73ed9f4f85e4548bc59.zip |
Corrected the type for several variables through the code
- Variable types were changed to int, where it makes sense to
- Corrects several warnings in VS2015
Signed-off-by: Haru <haru@dotalux.com>
Diffstat (limited to 'src/map/intif.c')
-rw-r--r-- | src/map/intif.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/map/intif.c b/src/map/intif.c index ec0251dad..e71f3df48 100644 --- a/src/map/intif.c +++ b/src/map/intif.c @@ -279,12 +279,14 @@ int intif_wis_replay(int id, int flag) // The transmission of GM only Wisp/Page from server to inter-server int intif_wis_message_to_gm(char *wisp_name, int permission, char *mes) { - size_t mes_len; + int mes_len; if (intif->CheckForCharServer()) return 0; nullpo_ret(wisp_name); nullpo_ret(mes); - mes_len = strlen(mes) + 1; // + null + mes_len = (int)strlen(mes) + 1; // + null + Assert_ret(mes_len > 0 && mes_len <= INT16_MAX - 32); + WFIFOHEAD(inter_fd, mes_len + 32); WFIFOW(inter_fd,0) = 0x3003; WFIFOW(inter_fd,2) = mes_len + 32; |