ANNOUNCEMENT: Live Wireshark University & Allegro Packets online APAC Wireshark Training Session
July 17th, 2024 | 10:00am-11:55am SGT (UTC+8) | Online

Wireshark-dev: Re: [Wireshark-dev] proto_tree_add_bits_ret_val() BUG

From: Ed Beroset <beroset@xxxxxxxxxxxxxx>
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