diff options
| author | Shauren <shauren.trinity@gmail.com> | 2012-07-04 18:24:05 +0200 |
|---|---|---|
| committer | Shauren <shauren.trinity@gmail.com> | 2012-07-04 18:24:05 +0200 |
| commit | c95905ddbb22e2b5b5362b790aa851ef10d4e27e (patch) | |
| tree | 669abda1d9fcea759f1240be6f96190ec81f4970 /src/server/shared | |
| parent | a6a556ce09facff3918a33be6b976e5ccb7e1469 (diff) | |
Core: Added 4.3.4 opcodes from WPP, commented out some code to fix compile (switches with opcodes - duplicate case 0: labels) and fixed authentication
Diffstat (limited to 'src/server/shared')
| -rwxr-xr-x | src/server/shared/Packets/ByteBuffer.h | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/server/shared/Packets/ByteBuffer.h b/src/server/shared/Packets/ByteBuffer.h index 1e346760e30..bc87950da16 100755 --- a/src/server/shared/Packets/ByteBuffer.h +++ b/src/server/shared/Packets/ByteBuffer.h @@ -564,11 +564,21 @@ class ByteBuffer std::string ReadString() { - std::string s = 0; + std::string s; (*this) >> s; return s; } + std::string ReadString(uint32 length) + { + char* buffer = new char[length + 1]; + memset(buffer, 0, length + 1); + read((uint8*)buffer, length); + std::string retval = buffer; + delete[] buffer; + return retval; + } + bool ReadBoolean() { uint8 b = 0; |
