diff options
author | Michael Mann <mmann78@netscape.net> | 2017-05-13 20:05:52 -0400 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2017-05-14 01:57:37 +0000 |
commit | 21735ead4f907b1323b5fd72ea698372774e0ee5 (patch) | |
tree | 9caa650b7aabb235525f75eead8548afe9da0dcb /epan/proto.c | |
parent | bd3e24f0dab1fb3d4846d54e32f837f56674a9c1 (diff) |
Add unit_name_string_get_double to handle float/double fields
Bug: 13705
Change-Id: I6bd006f216440d071e5c1eeb6b1f996b4a364c62
Reviewed-on: https://code.wireshark.org/review/21629
Reviewed-by: Michael Mann <mmann78@netscape.net>
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'epan/proto.c')
-rw-r--r-- | epan/proto.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/epan/proto.c b/epan/proto.c index 00318d6585..c9309fce59 100644 --- a/epan/proto.c +++ b/epan/proto.c @@ -5626,7 +5626,7 @@ proto_custom_set(proto_tree* tree, GSList *field_ids, gint occurrence, double d_value = fvalue_get_floating(&finfo->value); g_snprintf(result+offset_r, size-offset_r, "%." G_STRINGIFY(FLT_DIG) "g%s", d_value, - unit_name_string_get_value64((guint64)d_value, (unit_name_string*)hfinfo->strings)); + unit_name_string_get_double(d_value, (unit_name_string*)hfinfo->strings)); } else { g_snprintf(result+offset_r, size-offset_r, "%." G_STRINGIFY(FLT_DIG) "g", fvalue_get_floating(&finfo->value)); @@ -5639,7 +5639,7 @@ proto_custom_set(proto_tree* tree, GSList *field_ids, gint occurrence, double d_value = fvalue_get_floating(&finfo->value); g_snprintf(result+offset_r, size-offset_r, "%." G_STRINGIFY(DBL_DIG) "g%s", d_value, - unit_name_string_get_value64((guint64)d_value, (unit_name_string*)hfinfo->strings)); + unit_name_string_get_double(d_value, (unit_name_string*)hfinfo->strings)); } else { g_snprintf(result+offset_r, size-offset_r, "%." G_STRINGIFY(DBL_DIG) "g", fvalue_get_floating(&finfo->value)); @@ -7854,7 +7854,7 @@ proto_item_fill_label(field_info *fi, gchar *label_str) g_snprintf(label_str, ITEM_LABEL_LENGTH, "%s: %." G_STRINGIFY(FLT_DIG) "g%s", hfinfo->name, d_value, - unit_name_string_get_value64((guint64)d_value, (unit_name_string*)hfinfo->strings)); + unit_name_string_get_double(d_value, (unit_name_string*)hfinfo->strings)); } else { g_snprintf(label_str, ITEM_LABEL_LENGTH, "%s: %." G_STRINGIFY(FLT_DIG) "g", @@ -7869,7 +7869,7 @@ proto_item_fill_label(field_info *fi, gchar *label_str) g_snprintf(label_str, ITEM_LABEL_LENGTH, "%s: %." G_STRINGIFY(DBL_DIG) "g%s", hfinfo->name, d_value, - unit_name_string_get_value64((guint64)d_value, (unit_name_string*)hfinfo->strings)); + unit_name_string_get_double(d_value, (unit_name_string*)hfinfo->strings)); } else { g_snprintf(label_str, ITEM_LABEL_LENGTH, "%s: %." G_STRINGIFY(DBL_DIG) "g", |