diff options
author | Gavin Andresen <gavinandresen@gmail.com> | 2013-10-29 11:16:27 +1000 |
---|---|---|
committer | Gavin Andresen <gavinandresen@gmail.com> | 2013-10-29 11:20:14 +1000 |
commit | d5d1425657d0dd2dc76f4938c8141a387a81a5a8 (patch) | |
tree | 5083c171ee7a73e0c7ab6956987c23ddc2cf08af /share | |
parent | cd1fc2434ce80f50242e41b5e675f6d0b36045ad (diff) | |
download | bitcoin-d5d1425657d0dd2dc76f4938c8141a387a81a5a8.tar.xz |
Bug fix: CDataStream::GetAndClear() when nReadPos > 0
Changed CDataStream::GetAndClear() to use the most obvious
get get and clear instead of a tricky swap().
Added a unit test for CDataStream insert/erase/GetAndClear.
Note: GetAndClear() is not performance critical, it is used only
by the send-a-message-to-the-network code. Bug was not noticed
before now because the send-a-message code never erased from the
stream.
Diffstat (limited to 'share')
0 files changed, 0 insertions, 0 deletions