summaryrefslogtreecommitdiff
path: root/src/net/eathena
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-10-16 00:27:51 +0300
committerAndrei Karas <akaras@inbox.ru>2012-10-16 00:32:49 +0300
commit2ed0917b4ee942ff55639500f846ae9cb4f48b90 (patch)
tree431158e61d703a747115088e1b084651c923e0dd /src/net/eathena
parent875ece90ff94c4cf295b53c8bb37d9238ece38e9 (diff)
downloadmanaplus-2ed0917b4ee942ff55639500f846ae9cb4f48b90.tar.gz
manaplus-2ed0917b4ee942ff55639500f846ae9cb4f48b90.tar.bz2
manaplus-2ed0917b4ee942ff55639500f846ae9cb4f48b90.tar.xz
manaplus-2ed0917b4ee942ff55639500f846ae9cb4f48b90.zip
Fix some signed/unsigned chars issues.
Diffstat (limited to 'src/net/eathena')
-rw-r--r--src/net/eathena/chathandler.cpp4
-rw-r--r--src/net/eathena/playerhandler.cpp4
-rw-r--r--src/net/eathena/playerhandler.h2
3 files changed, 5 insertions, 5 deletions
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<char>(i));
+ outMsg.writeInt8(static_cast<unsigned char>(i));
else if (line.length() <= 5)
outMsg.writeInt16(static_cast<short>(i));
else
@@ -210,7 +210,7 @@ void ChatHandler::processRaw(MessageOut &outMsg, std::string &line)
switch (header[0])
{
case '1':
- outMsg.writeInt8(static_cast<char>(i));
+ outMsg.writeInt8(static_cast<unsigned char>(i));
break;
case '2':
outMsg.writeInt16(static_cast<short>(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);