mirror of
https://github.com/zeek/zeek.git
synced 2025-10-10 10:38:20 +00:00
fix empty field bug in threaded version
This commit is contained in:
parent
93fac7a4be
commit
d81607c3e9
1 changed files with 4 additions and 2 deletions
|
@ -1547,7 +1547,8 @@ HashKey* Manager::HashValues(const int num_elements, const Value* const *vals) {
|
||||||
|
|
||||||
for ( int i = 0; i < num_elements; i++ ) {
|
for ( int i = 0; i < num_elements; i++ ) {
|
||||||
const Value* val = vals[i];
|
const Value* val = vals[i];
|
||||||
length += GetValueLength(val);
|
if ( val->present )
|
||||||
|
length += GetValueLength(val);
|
||||||
}
|
}
|
||||||
|
|
||||||
//reporter->Error("Length: %d", length);
|
//reporter->Error("Length: %d", length);
|
||||||
|
@ -1560,7 +1561,8 @@ HashKey* Manager::HashValues(const int num_elements, const Value* const *vals) {
|
||||||
//memset(data, 0, length);
|
//memset(data, 0, length);
|
||||||
for ( int i = 0; i < num_elements; i++ ) {
|
for ( int i = 0; i < num_elements; i++ ) {
|
||||||
const Value* val = vals[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);
|
hash_t key = HashKey::HashBytes(data, length);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue