summaryrefslogtreecommitdiff
path: root/src/net/messagein.h
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2011-10-07 22:28:26 +0300
committerAndrei Karas <akaras@inbox.ru>2011-10-07 22:28:26 +0300
commitaf98cb5dea5644e0d95a5bf41c03655e4ab808ef (patch)
tree02cf26d058760b25412fea71d1fb25c3c1626570 /src/net/messagein.h
parent8bbb2cbef9ab7a8c095ef4cb0bfc29cd26c62213 (diff)
downloadmanaplus-af98cb5dea5644e0d95a5bf41c03655e4ab808ef.tar.gz
manaplus-af98cb5dea5644e0d95a5bf41c03655e4ab808ef.tar.bz2
manaplus-af98cb5dea5644e0d95a5bf41c03655e4ab808ef.tar.xz
manaplus-af98cb5dea5644e0d95a5bf41c03655e4ab808ef.zip
Fix code style.
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. */
/**