summaryrefslogtreecommitdiffstats
path: root/src/messageout.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/messageout.cpp')
-rw-r--r--src/messageout.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/messageout.cpp b/src/messageout.cpp
index 2bdc52e..2aca011 100644
--- a/src/messageout.cpp
+++ b/src/messageout.cpp
@@ -26,8 +26,7 @@
#include <cstdlib>
MessageOut::MessageOut():
- packet(0),
- pos(0)
+ packet(0)
{
packet = new Packet(NULL, 0);
}
@@ -72,6 +71,7 @@ void MessageOut::writeString(const std::string &string, int length)
// actual string
memcpy(&packet->data[packet->length + sizeof(unsigned short)],
(void*)string.c_str(), length);
+
packet->length += length + sizeof(unsigned short);
}