From c3434fa53d1c83bc65b640951364f842fe6c79f4 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Tue, 16 Oct 2012 00:27:51 +0300 Subject: Fix some signed/unsigned chars issues. --- src/net/eathena/chathandler.cpp | 4 ++-- src/net/eathena/playerhandler.cpp | 4 ++-- src/net/eathena/playerhandler.h | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) (limited to 'src/net/eathena') diff --git a/src/net/eathena/chathandler.cpp b/src/net/eathena/chathandler.cpp index bd516ef26..679cdefc2 100644 --- a/src/net/eathena/chathandler.cpp +++ b/src/net/eathena/chathandler.cpp @@ -181,7 +181,7 @@ void ChatHandler::processRaw(MessageOut &outMsg, std::string &line) { const int i = atoi(line.c_str()); if (line.length() <= 3) - outMsg.writeInt8(static_cast(i)); + outMsg.writeInt8(static_cast(i)); else if (line.length() <= 5) outMsg.writeInt16(static_cast(i)); else @@ -210,7 +210,7 @@ void ChatHandler::processRaw(MessageOut &outMsg, std::string &line) switch (header[0]) { case '1': - outMsg.writeInt8(static_cast(i)); + outMsg.writeInt8(static_cast(i)); break; case '2': outMsg.writeInt16(static_cast(i)); diff --git a/src/net/eathena/playerhandler.cpp b/src/net/eathena/playerhandler.cpp index 0d4a51bc9..f7a2dccb6 100644 --- a/src/net/eathena/playerhandler.cpp +++ b/src/net/eathena/playerhandler.cpp @@ -168,7 +168,7 @@ void PlayerHandler::pickUp(const FloorItem *floorItem) handler->pushPickup(floorItem->getId()); } -void PlayerHandler::setDirection(char direction) +void PlayerHandler::setDirection(unsigned char direction) { MessageOut outMsg(CMSG_PLAYER_CHANGE_DIR); outMsg.writeInt16(0); @@ -185,7 +185,7 @@ void PlayerHandler::setDestination(int x, int y, int direction) void PlayerHandler::changeAction(Being::Action action) { - char type; + unsigned char type; switch (action) { case Being::SIT: diff --git a/src/net/eathena/playerhandler.h b/src/net/eathena/playerhandler.h index 80d905460..ca2dc3fc3 100644 --- a/src/net/eathena/playerhandler.h +++ b/src/net/eathena/playerhandler.h @@ -50,7 +50,7 @@ class PlayerHandler final : public MessageHandler, public Ea::PlayerHandler void increaseSkill(unsigned short skillId); void pickUp(const FloorItem *floorItem); - void setDirection(char direction); + void setDirection(unsigned char direction); void setDestination(int x, int y, int direction = -1); void changeAction(Being::Action action); void updateStatus(uint8_t status); -- cgit v1.2.3-70-g09d2