Ethereal-dev: [Ethereal-dev] PATCH: FT_FLOAT in proto_tree_add_item

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: "Gustavo J. A. M. Carneiro" <gjc@xxxxxxxxxxxxx>
Date: Thu, 24 Mar 2005 17:19:42 +0000
  Please take this patch to enable support of FT_FLOAT in
proto_tree_add_item.

  Regards.

-- 
Gustavo J. A. M. Carneiro
<gjc@xxxxxxxxxxxxx> <gustavo@xxxxxxxxxxxxxxxxxxxxx>
The universe is always one step beyond logic.
diff -upr ethereal-0.10.4/epan/proto.c ethereal-0.10.4-gjc/epan/proto.c
--- ethereal-0.10.4/epan/proto.c	2004-05-04 02:32:24.000000000 +0100
+++ ethereal-0.10.4-gjc/epan/proto.c	2005-03-24 17:13:21.968252677 +0000
@@ -825,6 +825,10 @@ proto_tree_add_item(proto_tree *tree, in
 			new_fi->length = n + length;
 			break;
 
+		case FT_FLOAT:
+			proto_tree_set_float(new_fi, tvb_get_ntohieee_float(tvb, start));
+			break;
+
 		default:
 			g_error("new_fi->hfinfo->type %d (%s) not handled\n",
 					new_fi->hfinfo->type,

Attachment: smime.p7s
Description: S/MIME cryptographic signature