TRANSUM: fix fetching of Boolean values.

As of a change many years ago, Boolean values are stored as 64-bit (the
change was made to handle Boolean bitfields in 64-bit fields).  Fix the
extractor for Boolean values to fetch from the 64-bit unsigned integer
field, and, while we're at it, add a change that the field in question
really *is* a Boolean field (the functions used to fetch the value in
the other extractors do such a check).
This commit is contained in:
Guy Harris 2022-10-05 14:57:08 -07:00
parent 9b62db9308
commit b2cbc6f034
1 changed files with 2 additions and 1 deletions

View File

@ -118,7 +118,8 @@ int extract_bool(proto_tree *tree, int field_id, gboolean *result_array, size_t
{
fvalue_t *fv = &(((field_info*)finfo_array->pdata[i])->value);
if (fv->value.uinteger)
ws_assert(fvalue_type_ftenum(fv) == FT_BOOLEAN);
if (fv->value.uinteger64)
result_array[i] = TRUE;
else
result_array[i] = FALSE;