diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-09-06 00:51:01 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-09-06 02:02:31 +0300 |
commit | 1c00cf20fb58492489f8137161c552fe4d70d2cb (patch) | |
tree | cbe6d7a04f0582aa55f81bcaa28a68011c582efc /src/net/messagein.cpp | |
parent | c1b0e49636cbc2a08f7690c33a6367542f6857b3 (diff) | |
download | manaplus-1c00cf20fb58492489f8137161c552fe4d70d2cb.tar.gz manaplus-1c00cf20fb58492489f8137161c552fe4d70d2cb.tar.bz2 manaplus-1c00cf20fb58492489f8137161c552fe4d70d2cb.tar.xz manaplus-1c00cf20fb58492489f8137161c552fe4d70d2cb.zip |
eathena: read whole packet in processAddQuestsObjectives.
Diffstat (limited to 'src/net/messagein.cpp')
-rw-r--r-- | src/net/messagein.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/net/messagein.cpp b/src/net/messagein.cpp index 0c7f9cb7e..212ce9d55 100644 --- a/src/net/messagein.cpp +++ b/src/net/messagein.cpp @@ -200,6 +200,17 @@ void MessageIn::skip(const unsigned int length, const char *const str) PacketCounters::incInBytes(length); } +void MessageIn::skipToEnd(const char *const str) +{ + const int diff = static_cast<int>(mLength - mPos); + if (diff) + { + DEBUGLOG2("skip: " + toString(diff), mPos, str); + mPos = mLength; + PacketCounters::incInBytes(diff); + } +} + std::string MessageIn::readString(int length, const char *const dstr) { // Get string length |