summaryrefslogtreecommitdiff
path: root/src/net/messagein.h
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2011-10-17 22:07:24 +0300
committerAndrei Karas <akaras@inbox.ru>2011-10-17 22:07:24 +0300
commitd14bb7a27ee23cc83b3af1db2f1976eaaa55d78a (patch)
tree5f128768c66436eefd70632f02889607596609d4 /src/net/messagein.h
parentf1e92aca00a4859047e83fab76220767b9a2f814 (diff)
parente93e6beb456d105987da3190c2a80847b6900081 (diff)
downloadmv-stripped1.1.10.16.tar.gz
mv-stripped1.1.10.16.tar.bz2
mv-stripped1.1.10.16.tar.xz
mv-stripped1.1.10.16.zip
Merge branch 'master' into strippedstripped1.1.10.16
Conflicts: data/fonts/mplus-1p-bold.ttf data/fonts/mplus-1p-regular.ttf
Diffstat (limited to 'src/net/messagein.h')
-rw-r--r--src/net/messagein.h4
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. */
/**