FT_BOOLEAN is now stored as a 64-bit value; treat it as such.
Always look and set the uinteger64 member of the union for FT_BOOLEAN values. Bug: 12236 Change-Id: I7b0166e564b9d6cbb80051a81714a4b4c5f740a2 Reviewed-on: https://code.wireshark.org/review/14481 Reviewed-by: Guy Harris <guy@alum.mit.edu>
This commit is contained in:
parent
e13b53c939
commit
3570d264c1
|
@ -260,10 +260,10 @@ mk_fvalue_from_val_string(dfwork_t *dfw, header_field_info *hfinfo, char *s)
|
|||
}
|
||||
|
||||
if (g_ascii_strcasecmp(s, tf->true_string) == 0) {
|
||||
return mk_uint32_fvalue(TRUE);
|
||||
return mk_uint64_fvalue(TRUE);
|
||||
}
|
||||
else if (g_ascii_strcasecmp(s, tf->false_string) == 0) {
|
||||
return mk_uint32_fvalue(FALSE);
|
||||
return mk_uint64_fvalue(FALSE);
|
||||
}
|
||||
else {
|
||||
/*
|
||||
|
|
|
@ -675,7 +675,7 @@ cmp_bitwise_and64(const fvalue_t *a, const fvalue_t *b)
|
|||
static void
|
||||
boolean_fvalue_new(fvalue_t *fv)
|
||||
{
|
||||
fv->value.uinteger = TRUE;
|
||||
fv->value.uinteger64 = TRUE;
|
||||
}
|
||||
|
||||
static int
|
||||
|
@ -687,7 +687,7 @@ boolean_repr_len(fvalue_t *fv _U_, ftrepr_t rtype _U_, int field_display _U_)
|
|||
static void
|
||||
boolean_to_repr(fvalue_t *fv, ftrepr_t rtype _U_, int field_display _U_, char *buf)
|
||||
{
|
||||
*buf++ = (fv->value.uinteger) ? '1' : '0';
|
||||
*buf++ = (fv->value.uinteger64) ? '1' : '0';
|
||||
*buf = '\0';
|
||||
}
|
||||
|
||||
|
@ -695,8 +695,8 @@ boolean_to_repr(fvalue_t *fv, ftrepr_t rtype _U_, int field_display _U_, char *b
|
|||
static gboolean
|
||||
bool_eq(const fvalue_t *a, const fvalue_t *b)
|
||||
{
|
||||
if (a->value.uinteger) {
|
||||
if (b->value.uinteger) {
|
||||
if (a->value.uinteger64) {
|
||||
if (b->value.uinteger64) {
|
||||
return TRUE;
|
||||
}
|
||||
else {
|
||||
|
@ -704,7 +704,7 @@ bool_eq(const fvalue_t *a, const fvalue_t *b)
|
|||
}
|
||||
}
|
||||
else {
|
||||
if (b->value.uinteger) {
|
||||
if (b->value.uinteger64) {
|
||||
return FALSE;
|
||||
}
|
||||
else {
|
||||
|
@ -1503,14 +1503,14 @@ ftype_register_integers(void)
|
|||
NULL, /* set_value_time */
|
||||
NULL, /* set_value_string */
|
||||
NULL, /* set_value_tvbuff */
|
||||
set_uinteger, /* set_value_uinteger */
|
||||
NULL, /* set_value_uinteger */
|
||||
NULL, /* set_value_sinteger */
|
||||
set_uinteger64, /* set_value_uinteger64 */
|
||||
NULL, /* set_value_sinteger64 */
|
||||
NULL, /* set_value_floating */
|
||||
|
||||
NULL, /* get_value */
|
||||
get_uinteger, /* get_value_uinteger */
|
||||
NULL, /* get_value_uinteger */
|
||||
NULL, /* get_value_sinteger */
|
||||
get_uinteger64, /* get_value_uinteger64 */
|
||||
NULL, /* get_value_sinteger64 */
|
||||
|
|
Loading…
Reference in New Issue