summaryrefslogtreecommitdiff
path: root/src/map/clif.c
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2017-03-20 17:47:55 +0300
committerAndrei Karas <akaras@inbox.ru>2017-03-20 19:58:54 +0300
commit1885e79a35b841b0f720d461171f00e1c4e7fa63 (patch)
tree716991f4bfd485d4405523be650b12a69d8c462e /src/map/clif.c
parent9b903d3ac3a9ca6d4111210cee73b59354a6a271 (diff)
downloadhercules-1885e79a35b841b0f720d461171f00e1c4e7fa63.tar.gz
hercules-1885e79a35b841b0f720d461171f00e1c4e7fa63.tar.bz2
hercules-1885e79a35b841b0f720d461171f00e1c4e7fa63.tar.xz
hercules-1885e79a35b841b0f720d461171f00e1c4e7fa63.zip
Fix npc text input For 2015 clients (Fixes #1640).
Based on ragemu commit: commit a7ff9d064b238f5c2c4947f41eeaa0bfe331f2e6 Author: athron98 <athron.poster@gmail.com> Date: Mon May 23 20:36:43 2016 +0700 input fix
Diffstat (limited to 'src/map/clif.c')
-rw-r--r--src/map/clif.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/map/clif.c b/src/map/clif.c
index 597a890ae..8fae28e74 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -11626,7 +11626,12 @@ void clif_parse_NpcStringInput(int fd, struct map_session_data* sd) __attribute_
/// 01d5 <packet len>.W <npc id>.L <string>.?B
void clif_parse_NpcStringInput(int fd, struct map_session_data* sd)
{
- int message_len = RFIFOW(fd,2)-8;
+// [4144] can't confirm exact client version. At least >= correct for 20150513
+#if PACKETVER >= 20151029
+ int message_len = RFIFOW(fd, 2) - 7;
+#else
+ int message_len = RFIFOW(fd, 2) - 8;
+#endif
int npcid = RFIFOL(fd,4);
const char *message = RFIFOP(fd,8);