Opened 8 years ago

Closed 8 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:
Platform: All

Description

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)

by markh, 8 years ago

Attachment: test_bigendian.rsrc added

comment:1 by markh, 8 years ago

patch: 01

comment:2 by markh, 8 years ago

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 by waddlesplash, 8 years ago

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 by markh, 8 years ago

I fixed the issues and attached a new patch.

comment:5 by waddlesplash, 8 years ago

Resolution: fixed
Status: newclosed

Applied in hrev50317.

Note: See TracTickets for help on using tickets.