From 9a7dde29dc1bc1f699508ad9c0335f4d7abf319f Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Mon, 31 Jul 2023 11:16:58 -0700 Subject: It actually works. Now to make it fast fast. --- src/stable/clientbuf.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/stable/clientbuf.cpp') diff --git a/src/stable/clientbuf.cpp b/src/stable/clientbuf.cpp index 4e59120..c6b310f 100644 --- a/src/stable/clientbuf.cpp +++ b/src/stable/clientbuf.cpp @@ -200,9 +200,9 @@ Bu::size Bu::ClientBuf::ClientAccess::peek( void *pData, int iBytes, // Do we have enough data in the peek buffer to handle this? if( qbPeek.getSize() < iBytes+iOffset ) { - Bu::println("ClientAccess::peek: Insufficient buffered data (%1)").arg( qbPeek.getSize() ); + Bu::println("ClientAccess::peek: Insufficient buffered (have %1b, need %2b)").arg( qbPeek.getSize() ).arg( iBytes+iOffset ); // Nope, make an attempt to fill it in. - int nDiff = iBytes-qbPeek.getSize(); + int nDiff = (iBytes+iOffset)-qbPeek.getSize(); // We have to make our own buffer, since iBytes+nOffeset could be bigger // than pData. char *pTmp = new char[nDiff]; -- cgit v1.2.3