diff options
author | Mike Buland <eichlan@xagasoft.com> | 2023-07-31 11:16:58 -0700 |
---|---|---|
committer | Mike Buland <eichlan@xagasoft.com> | 2023-07-31 11:16:58 -0700 |
commit | 9a7dde29dc1bc1f699508ad9c0335f4d7abf319f (patch) | |
tree | eb3ab95cf784c799d85df81eb5b631b6a04c1730 /src/stable/clientbuf.cpp | |
parent | 412173a23c88a49ebaeb982e0c7eeddc5662b8cc (diff) | |
download | libbu++-9a7dde29dc1bc1f699508ad9c0335f4d7abf319f.tar.gz libbu++-9a7dde29dc1bc1f699508ad9c0335f4d7abf319f.tar.bz2 libbu++-9a7dde29dc1bc1f699508ad9c0335f4d7abf319f.tar.xz libbu++-9a7dde29dc1bc1f699508ad9c0335f4d7abf319f.zip |
It actually works. Now to make it fast fast.
Diffstat (limited to 'src/stable/clientbuf.cpp')
-rw-r--r-- | src/stable/clientbuf.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
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, | |||
200 | // Do we have enough data in the peek buffer to handle this? | 200 | // Do we have enough data in the peek buffer to handle this? |
201 | if( qbPeek.getSize() < iBytes+iOffset ) | 201 | if( qbPeek.getSize() < iBytes+iOffset ) |
202 | { | 202 | { |
203 | Bu::println("ClientAccess::peek: Insufficient buffered data (%1)").arg( qbPeek.getSize() ); | 203 | Bu::println("ClientAccess::peek: Insufficient buffered (have %1b, need %2b)").arg( qbPeek.getSize() ).arg( iBytes+iOffset ); |
204 | // Nope, make an attempt to fill it in. | 204 | // Nope, make an attempt to fill it in. |
205 | int nDiff = iBytes-qbPeek.getSize(); | 205 | int nDiff = (iBytes+iOffset)-qbPeek.getSize(); |
206 | // We have to make our own buffer, since iBytes+nOffeset could be bigger | 206 | // We have to make our own buffer, since iBytes+nOffeset could be bigger |
207 | // than pData. | 207 | // than pData. |
208 | char *pTmp = new char[nDiff]; | 208 | char *pTmp = new char[nDiff]; |