diff options
author | madmaxoft <github@xoft.cz> | 2014-09-25 20:46:50 +0200 |
---|---|---|
committer | madmaxoft <github@xoft.cz> | 2014-09-25 20:47:29 +0200 |
commit | 8f4cc27e39188d302f6575e7324002e2515fd789 (patch) | |
tree | 50069778d50f256b3316c18a18d6203f04909c56 /src/ByteBuffer.cpp | |
parent | Merge pull request #1452 from Howaner/Fixes (diff) | |
download | cuberite-8f4cc27e39188d302f6575e7324002e2515fd789.tar cuberite-8f4cc27e39188d302f6575e7324002e2515fd789.tar.gz cuberite-8f4cc27e39188d302f6575e7324002e2515fd789.tar.bz2 cuberite-8f4cc27e39188d302f6575e7324002e2515fd789.tar.lz cuberite-8f4cc27e39188d302f6575e7324002e2515fd789.tar.xz cuberite-8f4cc27e39188d302f6575e7324002e2515fd789.tar.zst cuberite-8f4cc27e39188d302f6575e7324002e2515fd789.zip |
Diffstat (limited to '')
-rw-r--r-- | src/ByteBuffer.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/ByteBuffer.cpp b/src/ByteBuffer.cpp index 17e8091c7..5bf98eda9 100644 --- a/src/ByteBuffer.cpp +++ b/src/ByteBuffer.cpp @@ -547,6 +547,19 @@ bool cByteBuffer::WriteBEShort(short a_Value) +bool cByteBuffer::WriteBEUShort(unsigned short a_Value) +{ + CHECK_THREAD; + CheckValid(); + PUTBYTES(2); + u_short Converted = htons((u_short)a_Value); + return WriteBuf(&Converted, 2); +} + + + + + bool cByteBuffer::WriteBEInt(int a_Value) { CHECK_THREAD; |