diff options
author | weidai <weidai11@users.noreply.github.com> | 2003-10-14 01:25:28 +0000 |
---|---|---|
committer | weidai <weidai11@users.noreply.github.com> | 2003-10-14 01:25:28 +0000 |
commit | cdcfe6b6af0d2cf0cced0930391f14861a823725 (patch) | |
tree | eda6d83abd4472bb82bfb58abfbda79ea13b9431 /queue.cpp | |
parent | 1b953a6a6c5eaa781e9ac113d848d1fda7528f8f (diff) | |
download | cryptopp-git-cdcfe6b6af0d2cf0cced0930391f14861a823725.tar.gz |
fix bug (found by Michael Hunley)
Diffstat (limited to 'queue.cpp')
-rw-r--r-- | queue.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
@@ -129,11 +129,18 @@ public: // ******************************************************** ByteQueue::ByteQueue(unsigned int nodeSize) - : m_autoNodeSize(m_nodeSize==0), m_nodeSize(nodeSize ? nodeSize : 256), m_lazyLength(0) + : m_lazyLength(0) { + SetNodeSize(nodeSize); m_head = m_tail = new ByteQueueNode(m_nodeSize); } +void ByteQueue::SetNodeSize(unsigned int nodeSize) +{ + m_autoNodeSize = !nodeSize; + m_nodeSize = m_autoNodeSize ? 256 : nodeSize; +} + ByteQueue::ByteQueue(const ByteQueue ©) { CopyFrom(copy); |