summaryrefslogtreecommitdiff
path: root/src/net/messagein.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-09-06 00:51:01 +0300
committerAndrei Karas <akaras@inbox.ru>2014-09-06 02:02:31 +0300
commit1c00cf20fb58492489f8137161c552fe4d70d2cb (patch)
treecbe6d7a04f0582aa55f81bcaa28a68011c582efc /src/net/messagein.cpp
parentc1b0e49636cbc2a08f7690c33a6367542f6857b3 (diff)
downloadmanaverse-1c00cf20fb58492489f8137161c552fe4d70d2cb.tar.gz
manaverse-1c00cf20fb58492489f8137161c552fe4d70d2cb.tar.bz2
manaverse-1c00cf20fb58492489f8137161c552fe4d70d2cb.tar.xz
manaverse-1c00cf20fb58492489f8137161c552fe4d70d2cb.zip
eathena: read whole packet in processAddQuestsObjectives.
Diffstat (limited to 'src/net/messagein.cpp')
-rw-r--r--src/net/messagein.cpp11
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