summaryrefslogtreecommitdiff
path: root/src/net/messagein.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/net/messagein.cpp')
-rw-r--r--src/net/messagein.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/net/messagein.cpp b/src/net/messagein.cpp
index 301d51ad9..ccc80a838 100644
--- a/src/net/messagein.cpp
+++ b/src/net/messagein.cpp
@@ -55,6 +55,18 @@ unsigned char MessageIn::readUInt8()
mPos += 1;
PacketCounters::incInBytes(1);
+ DEBUGLOG("readUInt8: " + toStringPrint(static_cast<int>(value)));
+ return value;
+}
+
+signed char MessageIn::readInt8()
+{
+ signed char value = static_cast<signed char>(-1);
+ if (mPos < mLength)
+ value = static_cast<signed char>(mData[mPos]);
+
+ mPos += 1;
+ PacketCounters::incInBytes(1);
DEBUGLOG("readInt8: " + toStringPrint(static_cast<int>(value)));
return value;
}