diff --git a/src/ca/comBuf.h b/src/ca/comBuf.h index b74da3925..d99132a14 100644 --- a/src/ca/comBuf.h +++ b/src/ca/comBuf.h @@ -330,7 +330,7 @@ inline unsigned comBuf::push ( const epicsOldString * pValue, unsigned nElem ) nBytes = nElem * sizeof ( *pValue ); } memcpy ( &this->buf[ index ], pValue, nBytes ); - this->nextWriteIndex += nBytes; + this->nextWriteIndex = index + nBytes; return nElem; }