summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-11-22 21:51:06 +0100
committermadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-11-22 21:51:06 +0100
commit95a94c3db85fa7c94a5e359ee691b72263111869 (patch)
tree5eb9534247f96bf0ecc1d3bb7e8463fae56acfa0
parentMore ByteBuffer checks: Is it used from a single thread only? (diff)
downloadcuberite-95a94c3db85fa7c94a5e359ee691b72263111869.tar
cuberite-95a94c3db85fa7c94a5e359ee691b72263111869.tar.gz
cuberite-95a94c3db85fa7c94a5e359ee691b72263111869.tar.bz2
cuberite-95a94c3db85fa7c94a5e359ee691b72263111869.tar.lz
cuberite-95a94c3db85fa7c94a5e359ee691b72263111869.tar.xz
cuberite-95a94c3db85fa7c94a5e359ee691b72263111869.tar.zst
cuberite-95a94c3db85fa7c94a5e359ee691b72263111869.zip
-rw-r--r--source/ByteBuffer.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/source/ByteBuffer.cpp b/source/ByteBuffer.cpp
index 75464ba45..028b4f08a 100644
--- a/source/ByteBuffer.cpp
+++ b/source/ByteBuffer.cpp
@@ -297,7 +297,9 @@ bool cByteBuffer::ReadBool(bool & a_Value)
CHECK_THREAD;
CheckValid();
NEEDBYTES(1);
- a_Value = (m_Buffer[m_ReadPos++] != 0);
+ char Value = 0;
+ ReadBuf(&Value, 1);
+ a_Value = (Value != 0);
return true;
}