Validating packets (starting with loot) (#5079)

This commit is contained in:
dannuic authored and GitHub committed 2026-05-07 20:56:10 -07:00
1 parent 99f99c8b8e
commit 65330af50e
6 files changed
+128 -61

No files matched your search

+1
View File
@@ -81,6 +81,7 @@ public:
void ReadString(char *str) { uint32 len = static_cast<uint32>(strlen((char *)(pBuffer + _rpos))) + 1; memcpy(str, pBuffer + _rpos, len); _rpos += len; }
void ReadString(std::string &str) { str = reinterpret_cast<char *>(pBuffer + _rpos); _rpos += str.length() + 1; }
void ReadString(char *str, uint32 Offset, uint32 MaxLength) const;
void ReadLengthString(std::string& str) { uint32 len = *(uint32*)(pBuffer + _rpos); _rpos += sizeof(uint32); str.resize(len); memcpy(&str[0], pBuffer + _rpos, len); _rpos += len; }
uint32 GetWritePosition() { return _wpos; }
uint32 GetReadPosition() { return _rpos; }