FT_DOUBLEs are 8 bytes; use FT_FLOAT for 4-byte floating-point values.

Change-Id: Ia39f8604229df18e1cdbbf81b78cd423e70f0f3c
Reviewed-on: https://code.wireshark.org/review/6386
Reviewed-by: Guy Harris <guy@alum.mit.edu>
This commit is contained in:
Guy Harris 2015-01-07 16:50:23 -08:00
parent 8f1b82b0aa
commit 6edb27b58e
1 changed files with 30 additions and 12 deletions

View File

@ -3543,9 +3543,12 @@ static int hf_dis_force_id = -1;
static int hf_dis_entity_linear_velocity_x = -1;
static int hf_dis_entity_linear_velocity_y = -1;
static int hf_dis_entity_linear_velocity_z = -1;
static int hf_dis_entity_location_x = -1;
static int hf_dis_entity_location_y = -1;
static int hf_dis_entity_location_z = -1;
static int hf_dis_entity_location_x_double = -1;
static int hf_dis_entity_location_x_float = -1;
static int hf_dis_entity_location_y_double = -1;
static int hf_dis_entity_location_y_float = -1;
static int hf_dis_entity_location_z_double = -1;
static int hf_dis_entity_location_z_float = -1;
static int hf_dis_entity_orientation_psi = -1;
static int hf_dis_entity_orientation_theta = -1;
static int hf_dis_entity_orientation_phi = -1;
@ -4518,11 +4521,11 @@ static int dissect_DIS_PARSER_ENTITY_STATE_PDU(tvbuff_t *tvb, packet_info *pinfo
offset += 4;
sub_tree = proto_tree_add_subtree(tree, tvb, offset, 24, ett_entity_location, NULL, "Entity Location");
proto_tree_add_item(sub_tree, hf_dis_entity_location_x, tvb, offset, 8, ENC_BIG_ENDIAN);
proto_tree_add_item(sub_tree, hf_dis_entity_location_x_double, tvb, offset, 8, ENC_BIG_ENDIAN);
offset += 8;
proto_tree_add_item(sub_tree, hf_dis_entity_location_y, tvb, offset, 8, ENC_BIG_ENDIAN);
proto_tree_add_item(sub_tree, hf_dis_entity_location_y_double, tvb, offset, 8, ENC_BIG_ENDIAN);
offset += 8;
proto_tree_add_item(sub_tree, hf_dis_entity_location_z, tvb, offset, 8, ENC_BIG_ENDIAN);
proto_tree_add_item(sub_tree, hf_dis_entity_location_z_double, tvb, offset, 8, ENC_BIG_ENDIAN);
offset += 8;
sub_tree = proto_tree_add_subtree(tree, tvb, offset, 12, ett_entity_orientation, NULL, "Entity Orientation");
@ -5213,11 +5216,11 @@ static int dissect_DIS_PARSER_DETONATION_PDU(tvbuff_t *tvb, packet_info *pinfo _
sub_tree = proto_tree_add_subtree(tree, tvb, offset, 12, ett_linear_velocity, NULL, "Location in Entity Coordinates");
proto_tree_add_item(sub_tree, hf_dis_entity_location_x, tvb, offset, 4, ENC_BIG_ENDIAN);
proto_tree_add_item(sub_tree, hf_dis_entity_location_x_float, tvb, offset, 4, ENC_BIG_ENDIAN);
offset += 4;
proto_tree_add_item(sub_tree, hf_dis_entity_location_y, tvb, offset, 4, ENC_BIG_ENDIAN);
proto_tree_add_item(sub_tree, hf_dis_entity_location_y_float, tvb, offset, 4, ENC_BIG_ENDIAN);
offset += 4;
proto_tree_add_item(sub_tree, hf_dis_entity_location_z, tvb, offset, 4, ENC_BIG_ENDIAN);
proto_tree_add_item(sub_tree, hf_dis_entity_location_z_float, tvb, offset, 4, ENC_BIG_ENDIAN);
offset += 4;
proto_tree_add_item(tree, hf_dis_detonation_result, tvb, offset, 1, ENC_BIG_ENDIAN);
@ -6923,21 +6926,36 @@ void proto_register_dis(void)
FT_FLOAT, BASE_NONE, NULL, 0x0,
NULL, HFILL}
},
{ &hf_dis_entity_location_x,
{ &hf_dis_entity_location_x_double,
{"X", "dis.entity_location.x",
FT_DOUBLE, BASE_NONE, NULL, 0x0,
NULL, HFILL}
},
{ &hf_dis_entity_location_y,
{ &hf_dis_entity_location_x_float,
{"X", "dis.entity_location.x",
FT_FLOAT, BASE_NONE, NULL, 0x0,
NULL, HFILL}
},
{ &hf_dis_entity_location_y_double,
{"Y", "dis.entity_location.y",
FT_DOUBLE, BASE_NONE, NULL, 0x0,
NULL, HFILL}
},
{ &hf_dis_entity_location_z,
{ &hf_dis_entity_location_y_float,
{"Y", "dis.entity_location.y",
FT_FLOAT, BASE_NONE, NULL, 0x0,
NULL, HFILL}
},
{ &hf_dis_entity_location_z_double,
{"Z", "dis.entity_location.z",
FT_DOUBLE, BASE_NONE, NULL, 0x0,
NULL, HFILL}
},
{ &hf_dis_entity_location_z_float,
{"Z", "dis.entity_location.z",
FT_FLOAT, BASE_NONE, NULL, 0x0,
NULL, HFILL}
},
{ &hf_dis_entity_orientation_psi,
{"Psi", "dis.entity_orientation.psi",
FT_FLOAT, BASE_NONE, NULL, 0x0,