fixed improper unprocessed protocol copy during buffer expansion
This commit is contained in:
1 parent
ff16932a0f
commit
1ee13af2a8
1 file changed
+3
-1
@@ -161,7 +161,9 @@ void inBuf::expandBuffer ()
|
||||
bufSizeT max = this->memMgr.maxSize();
|
||||
if ( this->bufSize < max ) {
|
||||
casBufferParm bufParm = this->memMgr.allocate ( max );
|
||||
memcpy ( bufParm.pBuf, &this->pBuf[this->nextReadIndex], this->bytesPresent () );
|
||||
bufSizeT unprocessedBytes = this->bytesPresent ();
|
||||
memcpy ( bufParm.pBuf, &this->pBuf[this->nextReadIndex], unprocessedBytes );
|
||||
this->bytesInBuffer = unprocessedBytes;
|
||||
this->nextReadIndex = 0u;
|
||||
this->memMgr.release ( this->pBuf, this->bufSize );
|
||||
this->pBuf = bufParm.pBuf;
|
||||
|
||||
Reference in new issue
Block a user