From c96447007e1f6ee0b4cb40195b0af6bd950f8e53 Mon Sep 17 00:00:00 2001 From: "madmaxoft@gmail.com" Date: Tue, 20 Nov 2012 20:44:47 +0000 Subject: Aggressive debug mode cByteBuffer validity checking. Hopefully fixed the "BytesToEndOfBuffer" assert. git-svn-id: http://mc-server.googlecode.com/svn/trunk@1057 0a769ca7-a7f5-676a-18bf-c427514a06d6 --- source/ByteBuffer.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'source/ByteBuffer.h') diff --git a/source/ByteBuffer.h b/source/ByteBuffer.h index 3981ab066..2a73ed597 100644 --- a/source/ByteBuffer.h +++ b/source/ByteBuffer.h @@ -97,6 +97,9 @@ public: /// Re-reads the data that has been read since the last commit to the current readpos. Used by ProtoProxy to duplicate communication void ReadAgain(AString & a_Out); + /// Checks if the internal state is valid (read and write positions in the correct bounds) using ASSERTs + void CheckValid(void) const; + protected: char * m_Buffer; int m_BufferSize; // Total size of the ringbuffer -- cgit v1.2.3