summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorIra Rice <irarice@gmail.com>2009-01-18 21:03:57 -0700
committerIra Rice <irarice@gmail.com>2009-01-18 21:03:57 -0700
commitd6184d3ce17ef2f63ada515ff83271a55a21987b (patch)
tree26d3caf7c7dfbb950294194a718b8df7ae95806e /src
parentd2b804c1a817ccdd85b4b1220bf929e9d370d774 (diff)
downloadmana-d6184d3ce17ef2f63ada515ff83271a55a21987b.tar.gz
mana-d6184d3ce17ef2f63ada515ff83271a55a21987b.tar.bz2
mana-d6184d3ce17ef2f63ada515ff83271a55a21987b.tar.xz
mana-d6184d3ce17ef2f63ada515ff83271a55a21987b.zip
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 <irarice@gmail.com>
Diffstat (limited to 'src')
-rw-r--r--src/npc.cpp6
1 files changed, 3 insertions, 3 deletions
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);
}
/*