diff options
author | Guy Harris <gharris@sonic.net> | 2022-10-05 14:57:08 -0700 |
---|---|---|
committer | Guy Harris <gharris@sonic.net> | 2022-10-05 14:57:08 -0700 |
commit | b2cbc6f034d6ef5e0813f59a45387cc79b9311e4 (patch) | |
tree | 7a983fd3c808414947b22dcc210e473292f60fe5 /plugins | |
parent | 9b62db9308505a017c9ecab53d56a5819038c5e8 (diff) |
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).
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/epan/transum/extractors.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/plugins/epan/transum/extractors.c b/plugins/epan/transum/extractors.c index 4e912e2a76..cd95550528 100644 --- a/plugins/epan/transum/extractors.c +++ b/plugins/epan/transum/extractors.c @@ -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; |