Fixing hashing records with optional strings.

This commit is contained in:
Robin Sommer 2011-02-07 14:46:49 -08:00
parent 0dbbee46ae
commit f43766650f

View file

@ -407,7 +407,7 @@ int CompositeHash::SingleTypeKeySize(BroType* bt, const Val* v,
case TYPE_INTERNAL_STRING: case TYPE_INTERNAL_STRING:
if ( ! v ) if ( ! v )
return 0; return optional ? sz : 0;
// Factor in length field. // Factor in length field.
sz = SizeAlign(sz, sizeof(int)); sz = SizeAlign(sz, sizeof(int));