Opened 3 years ago

Closed 3 years ago

#12779 closed bug (fixed)

Version info in big endian resource is not handled correctly

Reported by: markh Owned by: axeld
Priority: normal Milestone: Unscheduled
Component: Kits/Storage Kit Version: R1/Development
Keywords: Cc:
Blocked By: Blocking:
Has a Patch: yes Platform: All


When reading the version information of a big endian resource file, the numbers are read as if they are in the host endianess format, so they come out wrong on a little endian machine. For example 1 is shown as 16777216. See the attached resource for an example.

Attachments (3)

Change History (8)

Changed 3 years ago by markh

Attachment: test_bigendian.rsrc added

comment:1 Changed 3 years ago by markh

Has a Patch: set

comment:2 Changed 3 years ago by markh

Added a patch so the ResourceFile class knows what to do with the version info type. This was the best option according to the haiku dev mailing list.

comment:3 Changed 3 years ago by waddlesplash

Some coding style nits:

  • Only indent by one tab on continuation lines (lines 332, 1216)
  • Since the first block of the if() statements also contains a comment, places {}s around it

comment:4 Changed 3 years ago by markh

I fixed the issues and attached a new patch.

comment:5 Changed 3 years ago by waddlesplash

Resolution: fixed
Status: newclosed

Applied in hrev50317.

Note: See TracTickets for help on using tickets.