summaryrefslogtreecommitdiff
path: root/src/map
diff options
context:
space:
mode:
authorzephyrus <zephyrus@54d463be-8e91-2dee-dedb-b68131a5f0ec>2009-04-17 22:59:41 +0000
committerzephyrus <zephyrus@54d463be-8e91-2dee-dedb-b68131a5f0ec>2009-04-17 22:59:41 +0000
commit2ee911312cf1793361aac48fb016a63161197516 (patch)
tree31c2a307c5a3ab0429f258c09cc9f6aac22f01f4 /src/map
parentcd53d831b7e46645c79d9d7e571a081d0fea0254 (diff)
downloadhercules-2ee911312cf1793361aac48fb016a63161197516.tar.gz
hercules-2ee911312cf1793361aac48fb016a63161197516.tar.bz2
hercules-2ee911312cf1793361aac48fb016a63161197516.tar.xz
hercules-2ee911312cf1793361aac48fb016a63161197516.zip
- Critical crash fix. Please update your servers.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@13678 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map')
-rw-r--r--src/map/clif.c3
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);