From dacd6a5274fa18f626bdd7ec9014b6581afb2e18 Mon Sep 17 00:00:00 2001 From: madmaxoft Date: Sun, 3 Nov 2013 11:58:11 +0100 Subject: [PATCH] cByteBuffer: Fixed GetUsedSpace() off-by-one error. --- source/ByteBuffer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/ByteBuffer.cpp b/source/ByteBuffer.cpp index bccd1c48b..1cdd2f430 100644 --- a/source/ByteBuffer.cpp +++ b/source/ByteBuffer.cpp @@ -195,7 +195,7 @@ int cByteBuffer::GetUsedSpace(void) const { CHECK_THREAD; CheckValid(); - return m_BufferSize - GetFreeSpace(); + return m_BufferSize - GetFreeSpace() - 1; }