Validating packets (starting with loot) (#5079)

This commit is contained in:
dannuic
2026-05-07 21:56:10 -06:00
committed by GitHub
parent 99f99c8b8e
commit 65330af50e
6 changed files with 128 additions and 61 deletions
+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; }