fix endian issue for old savegames created on big endian system when trying to load them on little endian systems
svn-id: r4862
This commit is contained in:
parent
bacdd936f2
commit
39422bd24a
1 changed files with 3 additions and 1 deletions
|
@ -96,8 +96,10 @@ bool Scumm::loadState(int slot, bool compat)
|
|||
return false;
|
||||
}
|
||||
|
||||
// In older versions of ScummVM, the header version was not endian safe.
|
||||
// We account for that by retrying once with swapped byte order.
|
||||
if (hdr.ver < VER_V7 || hdr.ver > _current_version)
|
||||
hdr.ver = TO_LE_32(hdr.ver);
|
||||
hdr.ver = SWAP_BYTES(hdr.ver);
|
||||
if (hdr.ver < VER_V7 || hdr.ver > _current_version)
|
||||
{
|
||||
warning("Invalid version of '%s'", filename);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue