From bdd2a88890ea7819371047fa53eeca87209147d0 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sun, 19 Aug 2012 23:10:19 +0300 Subject: Fix compilation warnings. --- src/net/tmwa/network.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/net/tmwa/network.cpp') 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( + sizeof(packet_lengths) / sizeof (short))) + { len = packet_lengths[msgId]; + } } if (len == -1 && mInSize > 4) -- cgit v1.2.3-60-g2f50