Opened 22 years ago

Closed 22 years ago

Last modified 4 years ago

#37 closed defect (fixed)

Unaligned access in saveload.cpp

Reported by: SF/vasyl Owned by: SF/strigeus
Priority: normal Component: Engine: SCUMM
Version: Keywords:
Cc: Game:


Function saveLoadArrayOf contains four instances of unaligned access (byte pointer "at" is forced to uint16 and uint32 types). Two of these instances can be replaced by READ_LE_UINT16/UINT32. Two others either require more access functions to be added to scummvm.h or just using byte access instead.

This bug was reported to me by Oleg Zakharov.

This is not the same as the other bug reported earlier -- that one referred to unaligned access functions not being implemented in header, now fixed.

Ticket imported from: #480571. Ticket imported from: bugs/37.

Change History (6)

comment:1 by SF/strigeus, 22 years ago

saveLoadArrayOf should only read from data structures that are already aligned properly, so there's no need to change anything there. The source of the problem might have been that some structures were declared in the packed section of scumm.h even though they didn't need to be packed. I will commit the update in a little while.

comment:2 by SF/strigeus, 22 years ago

Owner: set to SF/strigeus

comment:3 by SF/strigeus, 22 years ago

Resolution: fixed
Status: newclosed

comment:4 by SF/strigeus, 22 years ago

It should be fixed now, if not, reopen.

comment:5 by digitall, 5 years ago

Component: Engine: SCUMM

comment:6 by Filippos Karapetis <bluegr@…>, 4 years ago

Last edited 4 years ago by criezy (previous) (diff)
Note: See TracTickets for help on using tickets.