Wireshark mailing list archives
Re: where is the best place to do the calculation
From: Stig Bjørlykke <stig () bjorlykke org>
Date: Wed, 21 Jul 2010 17:06:14 +0200
On Wed, Jul 21, 2010 at 4:57 PM, Brian Oleksa <oleksab () darkcornersoftware com> wrote:
Should latitude be a FT_FLOAT, FT_DOUBLE or what I have FT_UINT32. No matter what I try...I get the conversion from double to int possible loss of data error.
Use FT_DOUBLE and try something like this: double latitude = tvb_get_ntohl (tvb, offset) / 1000000 - 90.0; proto_tree_add_double(olsr_sub_tree, hf_olsr_latitude, tvb, offset, 4, latitude); -- Stig Bjørlykke ___________________________________________________________________________ Sent via: Wireshark-dev mailing list <wireshark-dev () wireshark org> Archives: http://www.wireshark.org/lists/wireshark-dev Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev mailto:wireshark-dev-request () wireshark org?subject=unsubscribe
Current thread:
- where is the best place to do the calculation Brian Oleksa (Jul 21)
- Re: where is the best place to do the calculation Stig Bjørlykke (Jul 21)