summaryrefslogtreecommitdiff
path: root/src/net/tmwa/network.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-08-19 23:10:19 +0300
committerAndrei Karas <akaras@inbox.ru>2012-08-19 23:10:19 +0300
commitbdd2a88890ea7819371047fa53eeca87209147d0 (patch)
tree95dcb4401bcb29ac0c043ecd278c4f1b8f3308dc /src/net/tmwa/network.cpp
parent78982d2707fc8db243cc29448c411a52b5aeeffb (diff)
downloadmanaplus-bdd2a88890ea7819371047fa53eeca87209147d0.tar.gz
manaplus-bdd2a88890ea7819371047fa53eeca87209147d0.tar.bz2
manaplus-bdd2a88890ea7819371047fa53eeca87209147d0.tar.xz
manaplus-bdd2a88890ea7819371047fa53eeca87209147d0.zip
Fix compilation warnings.
Diffstat (limited to 'src/net/tmwa/network.cpp')
-rw-r--r--src/net/tmwa/network.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/net/tmwa/network.cpp b/src/net/tmwa/network.cpp
index 98f6485a7..0492f6609 100644
--- a/src/net/tmwa/network.cpp
+++ b/src/net/tmwa/network.cpp
@@ -179,8 +179,11 @@ bool Network::messageReady()
}
else
{
- if (msgId >= 0 && msgId < sizeof(packet_lengths) / sizeof (short))
+ if (msgId >= 0 && msgId < static_cast<signed>(
+ sizeof(packet_lengths) / sizeof (short)))
+ {
len = packet_lengths[msgId];
+ }
}
if (len == -1 && mInSize > 4)