summaryrefslogtreecommitdiff
path: root/src/map/intif.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/map/intif.c')
-rw-r--r--src/map/intif.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/map/intif.c b/src/map/intif.c
index 346a847c8..2d6d39406 100644
--- a/src/map/intif.c
+++ b/src/map/intif.c
@@ -1035,11 +1035,11 @@ void intif_parse_WisToGM(int fd)
mes_len = RFIFOW(fd,2) - 33; // Length not including the NUL terminator
Assert_retv(mes_len > 0 && mes_len < 32000);
- message = (mes_len >= 255 ? aMalloc(mes_len) : mbuf);
+ message = (mes_len >= 255 ? aMalloc(mes_len + 1) : mbuf);
permission = RFIFOL(fd,28);
safestrncpy(Wisp_name, RFIFOP(fd,4), NAME_LENGTH);
- safestrncpy(message, RFIFOP(fd,32), mes_len);
+ safestrncpy(message, RFIFOP(fd,32), mes_len + 1);
// information is sent to all online GM
map->foreachpc(intif->pWisToGM_sub, permission, Wisp_name, message, mes_len);