[8389] Implement check really read received packet size and warning it not all data read. Author: VladimirMangos

* This let more easy catch packet structure chnages at client switch.
    * Fixed structure CMSG_GUILD_BANK_SWAP_ITEMS
    * Fixed structure CMSG_SPLIT_ITEM, CMSG_SELL_ITEM
    * Added read data amount fixes for some other packets.

    Thanks to TOM_RUS in help check correct packets structure.

    Note: not all packets possible fixed. Please report for not fixed cases at errors:
    "opcode %s (0x%.4X) have unprocessed tail data (read stop at %u from %u)"

--HG--
branch : trunk
This commit is contained in:
megamage
2009-08-19 17:07:21 -05:00
parent f5085b2f39
commit c911772125
9 changed files with 74 additions and 36 deletions
-3
View File
@@ -265,9 +265,6 @@ class ByteBuffer
template<typename T>
void read_skip() { read_skip(sizeof(T)); }
template<typename T1, typename T2>
void read_skip2() { read_skip(sizeof(T1)+sizeof(T2)); }
void read_skip(size_t skip)
{
if(_rpos + skip > size())