diff options
Diffstat (limited to 'src/map')
-rw-r--r-- | src/map/clif.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/map/clif.c b/src/map/clif.c index 61db7f26e..abc782b49 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -9796,6 +9796,9 @@ void clif_parse_NpcStringInput(int fd, struct map_session_data* sd) int message_len = RFIFOW(fd,2)-8; int npcid = RFIFOL(fd,4); const char* message = (char*)RFIFOP(fd,8); + + if( message_len < 0 ) + message_len = 0; safestrncpy(sd->npc_str, message, min(message_len,CHATBOX_SIZE)); npc_scriptcont(sd, npcid); |