summaryrefslogtreecommitdiff
path: root/src/map/intif.c
diff options
context:
space:
mode:
authorHaru <haru@dotalux.com>2016-04-30 00:11:44 +0200
committerHaru <haru@dotalux.com>2016-04-30 00:11:44 +0200
commite88ac41acf8d488c2b96771372a34880069e251a (patch)
treebed4fa20c35bd180498c23586f20883f57b7cba6 /src/map/intif.c
parent8ac699f4840bdadfb92326250295e1fed8286183 (diff)
downloadhercules-e88ac41acf8d488c2b96771372a34880069e251a.tar.gz
hercules-e88ac41acf8d488c2b96771372a34880069e251a.tar.bz2
hercules-e88ac41acf8d488c2b96771372a34880069e251a.tar.xz
hercules-e88ac41acf8d488c2b96771372a34880069e251a.zip
Corrected truncation of the last letter in whisper messages
- Follow-up to ccfd054 - Fixes #1275 Signed-off-by: Haru <haru@dotalux.com>
Diffstat (limited to 'src/map/intif.c')
-rw-r--r--src/map/intif.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/map/intif.c b/src/map/intif.c
index 05b1d7c29..da8eedb8d 100644
--- a/src/map/intif.c
+++ b/src/map/intif.c
@@ -988,7 +988,7 @@ void intif_parse_WisMessage(int fd) {
return;
}
//Success to send whisper.
- clif->wis_message(sd->fd, wisp_source, RFIFOP(fd,56),RFIFOW(fd,2)-56);
+ clif->wis_message(sd->fd, wisp_source, RFIFOP(fd,56),RFIFOW(fd,2)-57);
intif_wis_replay(id,0); // success
}
@@ -1032,9 +1032,9 @@ void mapif_parse_WisToGM(int fd)
char mbuf[255] = { 0 };
char *message;
- mes_len = RFIFOW(fd,2) - 32;
+ mes_len = RFIFOW(fd,2) - 33; // Length not including the NUL terminator
Assert_retv(mes_len > 0 && mes_len < 32000);
- message = (char *) (mes_len >= 255 ? (char *) aMalloc(mes_len) : mbuf);
+ message = (mes_len >= 255 ? aMalloc(mes_len) : mbuf);
permission = RFIFOL(fd,28);
safestrncpy(Wisp_name, RFIFOP(fd,4), NAME_LENGTH);