summaryrefslogtreecommitdiff
path: root/cpp/src/Freeze/EvictorIteratorI.cpp
diff options
context:
space:
mode:
authorBernard Normier <bernard@zeroc.com>2004-07-09 16:30:17 +0000
committerBernard Normier <bernard@zeroc.com>2004-07-09 16:30:17 +0000
commit5880a4768276db3361d22a1d58cc2cded185ed89 (patch)
treec62e471543fad6e585877d1db004a65df07c5dff /cpp/src/Freeze/EvictorIteratorI.cpp
parentFixes (diff)
downloadice-5880a4768276db3361d22a1d58cc2cded185ed89.tar.bz2
ice-5880a4768276db3361d22a1d58cc2cded185ed89.tar.xz
ice-5880a4768276db3361d22a1d58cc2cded185ed89.zip
Fixed bug: end of keys replaced by 0s
Diffstat (limited to 'cpp/src/Freeze/EvictorIteratorI.cpp')
-rw-r--r--cpp/src/Freeze/EvictorIteratorI.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/cpp/src/Freeze/EvictorIteratorI.cpp b/cpp/src/Freeze/EvictorIteratorI.cpp
index c82b9eb4af8..d85c1fffe46 100644
--- a/cpp/src/Freeze/EvictorIteratorI.cpp
+++ b/cpp/src/Freeze/EvictorIteratorI.cpp
@@ -121,6 +121,12 @@ Freeze::EvictorIteratorI::nextBatch()
{
try
{
+ //
+ // It is critical to set key size to key capacity before the
+ // get, as a resize that increases the size inserts 0
+ //
+ _key.resize(_key.capacity());
+
_more = (dbc->get(&dbKey, &dbValue, flags) == 0);
if(_more)
{