diff options
author | weidai <weidai11@users.noreply.github.com> | 2003-06-19 17:09:07 +0000 |
---|---|---|
committer | weidai <weidai11@users.noreply.github.com> | 2003-06-19 17:09:07 +0000 |
commit | 376fe5b4ae1607f4158e16bc4ace6e5b5b01154e (patch) | |
tree | 7e300cb2827b1bf3cc05695e5e89b5ef58b1be93 /queue.cpp | |
parent | 5b25f4b45fb67c48df4dd576f3271fe00e30796b (diff) | |
download | cryptopp-git-376fe5b4ae1607f4158e16bc4ace6e5b5b01154e.tar.gz |
sync with private branch
Diffstat (limited to 'queue.cpp')
-rw-r--r-- | queue.cpp | 12 |
1 files changed, 9 insertions, 3 deletions
@@ -234,9 +234,15 @@ void ByteQueue::LazyPut(const byte *inString, unsigned int size) { if (m_lazyLength > 0) FinalizeLazyPut(); - m_lazyString = const_cast<byte *>(inString); - m_lazyLength = size; - m_lazyStringModifiable = false; + + if (inString == m_tail->buf+m_tail->m_tail) + Put(inString, size); + else + { + m_lazyString = const_cast<byte *>(inString); + m_lazyLength = size; + m_lazyStringModifiable = false; + } } void ByteQueue::LazyPutModifiable(byte *inString, unsigned int size) |