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