Wireshark mailing list archives

Re: proto_tree_add_bits_ret_val() BUG


From: Ed Beroset <beroset () mindspring com>
Date: Fri, 7 Jan 2011 15:26:58 -0500 (GMT-05:00)

George Deprez wrote:

*proto_tree_add_bits_ret_val*() displays incorrect values when num_bits is
32

If I ask for 16 bits and adjust the offset by 16 and ask for 16 more I get
the correct bits.
If I ask for 64 bits from the base offset I get the correct bits.
But if I ask for 32 bits from the same base offset I get all zero.

Using the same bit offset, I tried different tests with FT_UINT16,FT_UINT32
and FT_UINT64.

Has anybody had this problem?

I haven't had that problem, and I'm not where I can check it out quickly, but I wonder if it might be an endian-ness 
problem.  Are you on a 64-bit machine by any chance?  It might be worth posting your platform and build details.

Ed

___________________________________________________________________________
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: