From e88ac41acf8d488c2b96771372a34880069e251a Mon Sep 17 00:00:00 2001 From: Haru Date: Sat, 30 Apr 2016 00:11:44 +0200 Subject: Corrected truncation of the last letter in whisper messages - Follow-up to ccfd054 - Fixes #1275 Signed-off-by: Haru --- src/map/intif.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/map/intif.c') 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); -- cgit v1.2.3-60-g2f50