From 5a60cfd0ef0c2f8b78397d05a50ab9b939309ea5 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sat, 31 May 2014 17:01:38 +0300 Subject: Fix sign on some vars. --- src/net/eathena/network.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/net/eathena/network.cpp') diff --git a/src/net/eathena/network.cpp b/src/net/eathena/network.cpp index 87d5d4b5a..9b3ede389 100644 --- a/src/net/eathena/network.cpp +++ b/src/net/eathena/network.cpp @@ -165,7 +165,7 @@ void Network::dispatchMessages() while (messageReady()) { SDL_mutexP(mMutexIn); - const int msgId = readWord(0); + const unsigned int msgId = readWord(0); int len = -1; if (msgId == SMSG_SERVER_VERSION_RESPONSE) { @@ -177,7 +177,7 @@ void Network::dispatchMessages() } else { - if (msgId >= 0 && msgId < packet_lengths_size) + if (msgId < packet_lengths_size) len = packet_lengths[msgId]; } @@ -191,12 +191,12 @@ void Network::dispatchMessages() if (len == 0) { // need copy data for safty - std::string str = strprintf("Wrong packet %d ""received. Exiting.", + std::string str = strprintf("Wrong packet %u ""received. Exiting.", msgId); logger->safeError(str); } - if (msgId >= 0 && msgId < messagesSize) + if (msgId < messagesSize) { MessageHandler *const handler = mMessageHandlers[msgId]; if (handler) -- cgit v1.2.3-70-g09d2