diff options
Diffstat (limited to 'src/net/messagein.h')
-rw-r--r-- | src/net/messagein.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/net/messagein.h b/src/net/messagein.h index eea298f4d..6d7038d4a 100644 --- a/src/net/messagein.h +++ b/src/net/messagein.h @@ -54,10 +54,12 @@ class MessageIn * Returns the length of unread data. */ unsigned int getUnreadLength() const - { return mLength - mPos; } + { return mLength > mPos ? mLength - mPos : 0; } virtual unsigned char readInt8(); /**< Reads a byte. */ + virtual Sint16 readInt16() = 0; /**< Reads a short. */ + virtual int readInt32() = 0; /**< Reads a long. */ /** |