fix empty field bug in threaded version

This commit is contained in:
Bernhard Amann 2012-02-23 14:36:04 -08:00
parent 93fac7a4be
commit d81607c3e9

View file

@ -1547,7 +1547,8 @@ HashKey* Manager::HashValues(const int num_elements, const Value* const *vals) {
for ( int i = 0; i < num_elements; i++ ) {
const Value* val = vals[i];
length += GetValueLength(val);
if ( val->present )
length += GetValueLength(val);
}
//reporter->Error("Length: %d", length);
@ -1560,7 +1561,8 @@ HashKey* Manager::HashValues(const int num_elements, const Value* const *vals) {
//memset(data, 0, length);
for ( int i = 0; i < num_elements; i++ ) {
const Value* val = vals[i];
position += CopyValue(data, position, val);
if ( val->present )
position += CopyValue(data, position, val);
}
hash_t key = HashKey::HashBytes(data, length);