diff options
author | Andrei Karas <akaras@inbox.ru> | 2019-03-02 00:49:39 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2019-03-02 00:49:39 +0300 |
commit | ad8f6fd4136646e251e3d79cef7b7db110364a9b (patch) | |
tree | f0ace4d61d9fee5ca9dfc6da6ef1e6bef9a92ef6 /src | |
parent | 50e0705465eb2dd3e08fe94c9206348b6abd5995 (diff) | |
download | plus-ad8f6fd4136646e251e3d79cef7b7db110364a9b.tar.gz plus-ad8f6fd4136646e251e3d79cef7b7db110364a9b.tar.bz2 plus-ad8f6fd4136646e251e3d79cef7b7db110364a9b.tar.xz plus-ad8f6fd4136646e251e3d79cef7b7db110364a9b.zip |
Fix reading packet len in inventory related packets
Diffstat (limited to 'src')
-rw-r--r-- | src/net/eathena/inventoryrecv.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/net/eathena/inventoryrecv.cpp b/src/net/eathena/inventoryrecv.cpp index 8a0b88dec..e84de0237 100644 --- a/src/net/eathena/inventoryrecv.cpp +++ b/src/net/eathena/inventoryrecv.cpp @@ -37,6 +37,7 @@ #include "enums/resources/notifytypes.h" #include "enums/net/deleteitemreason.h" +#include "enums/net/netinventorytype.h" #include "gui/popups/itempopup.h" @@ -1550,7 +1551,7 @@ void InventoryRecv::processInventoryEnd2(Net::MessageIn &msg) void InventoryRecv::processPlayerCombinedInventory1(Net::MessageIn &msg) { UNIMPLEMENTEDPACKET; - const int dataLen = msg.readInt32("len") - 4; + const int dataLen = msg.readInt16("len") - 4; processInventoryContinue(msg, dataLen, NetInventoryType::Storage); @@ -1559,7 +1560,7 @@ void InventoryRecv::processPlayerCombinedInventory1(Net::MessageIn &msg) void InventoryRecv::processPlayerCombinedInventory2(Net::MessageIn &msg) { UNIMPLEMENTEDPACKET; - const int dataLen = msg.readInt32("len") - 5; + const int dataLen = msg.readInt16("len") - 5; const NetInventoryTypeT invType = static_cast<NetInventoryTypeT>( msg.readUInt8("type")); processInventoryContinue(msg, @@ -1592,7 +1593,7 @@ void InventoryRecv::processInventoryContinue(Net::MessageIn &msg, void InventoryRecv::processPlayerCombinedEquipment1(Net::MessageIn &msg) { UNIMPLEMENTEDPACKET; - const int dataLen = msg.readInt32("len") - 4; + const int dataLen = msg.readInt16("len") - 4; processEquipmentContinue(msg, dataLen, NetInventoryType::Storage); @@ -1601,7 +1602,7 @@ void InventoryRecv::processPlayerCombinedEquipment1(Net::MessageIn &msg) void InventoryRecv::processPlayerCombinedEquipment2(Net::MessageIn &msg) { UNIMPLEMENTEDPACKET; - const int dataLen = msg.readInt32("len") - 5; + const int dataLen = msg.readInt16("len") - 5; const NetInventoryTypeT invType = static_cast<NetInventoryTypeT>( msg.readUInt8("type")); processEquipmentContinue(msg, |