summaryrefslogtreecommitdiff
path: root/src/net/eathena/pethandler.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/net/eathena/pethandler.cpp')
-rw-r--r--src/net/eathena/pethandler.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/net/eathena/pethandler.cpp b/src/net/eathena/pethandler.cpp
index 32f902e80..f89a6d53a 100644
--- a/src/net/eathena/pethandler.cpp
+++ b/src/net/eathena/pethandler.cpp
@@ -166,7 +166,8 @@ void PetHandler::processPetMessage(Net::MessageIn &msg)
if (!dstBeing)
return;
- const int hungry = data - (dstBeing->getSubType() - 100) * 100 - 50;
+ const int hungry = data - (toInt(dstBeing->getSubType(), int)
+ - 100) * 100 - 50;
if (hungry >= 0 && hungry <= 4)
{
if (localChatTab && localPlayer)