From d6184d3ce17ef2f63ada515ff83271a55a21987b Mon Sep 17 00:00:00 2001 From: Ira Rice Date: Sun, 18 Jan 2009 21:03:57 -0700 Subject: Fixed String dialog sending so that it doesn't crash the client after completing, as well as making it so that the server can actually use the string to match to the same value (which it wasn't doing before. Did anyone think to test that?) Would eventually like to whittle down the wasted bytes sent, but this so far is the least number that can be done, make it so that strings can be matched, and on top of that, NOT crash the map server. Signed-off-by: Ira Rice --- src/npc.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/npc.cpp') diff --git a/src/npc.cpp b/src/npc.cpp index ae5ca476..2dbf7f43 100644 --- a/src/npc.cpp +++ b/src/npc.cpp @@ -146,10 +146,10 @@ void NPC::stringInput(const std::string &value) { MessageOut outMsg(mNetwork); outMsg.writeInt16(CMSG_NPC_STR_RESPONSE); - outMsg.writeInt16(value.length() + 8); + outMsg.writeInt16(value.length() + 15); outMsg.writeInt32(mId); - outMsg.writeString(value, value.length()); - outMsg.writeInt8(0); // Just to be safe + outMsg.writeString(value, value.length() + 6); + outMsg.writeInt8(0); } /* -- cgit v1.2.3-70-g09d2