diff options
Diffstat (limited to 'src/server/shared/Packets')
| -rwxr-xr-x | src/server/shared/Packets/ByteBuffer.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/server/shared/Packets/ByteBuffer.h b/src/server/shared/Packets/ByteBuffer.h index 5b7d335d0fa..4386ce03d42 100755 --- a/src/server/shared/Packets/ByteBuffer.h +++ b/src/server/shared/Packets/ByteBuffer.h @@ -452,6 +452,13 @@ class ByteBuffer return retval; } + //! Method for writing strings that have their length sent separately in packet + //! without null-terminating the string + void WriteString(std::string const& str) + { + append(str.c_str(), str.length()); + } + const uint8 *contents() const { return &_storage[0]; } size_t size() const { return _storage.size(); } |
