mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-09 12:22:51 +00:00
Fixed bug that made ScummVM crash when loading a savegame where the main
character was walking. (I had missed a case where pointers were cast to integers.) svn-id: r12113
This commit is contained in:
parent
fa523f7f7e
commit
c1cddedca8
@ -350,7 +350,7 @@ uint32 Sword2Engine::restoreFromBuffer(Memory *buffer, uint32 size) {
|
||||
varsRes = _resman->openResource(1);
|
||||
|
||||
// copy that to the buffer, following the header
|
||||
memcpy(varsRes, buffer->ad + sizeof(_saveGameHeader), _saveGameHeader.varLength );
|
||||
memcpy(varsRes, buffer->ad + sizeof(_saveGameHeader), _saveGameHeader.varLength);
|
||||
|
||||
#ifdef SCUMM_BIG_ENDIAN
|
||||
uint32 *globalVars = (uint32 *) (varsRes + sizeof(StandardHeader));
|
||||
@ -583,10 +583,10 @@ int32 Logic::fnGetPlayerSaveData(int32 *params) {
|
||||
ob_mega->currently_walking = 0;
|
||||
|
||||
// pointer to object's graphic structure
|
||||
pars[0] = (int32) ob_graphic;
|
||||
pars[0] = _vm->_memory->ptrToInt((const uint8 *) ob_graphic);
|
||||
|
||||
// pointer to object's mega structure
|
||||
pars[1] = (int32) ob_mega;
|
||||
pars[1] = _vm->_memory->ptrToInt((const uint8 *) ob_mega);
|
||||
|
||||
// target direction
|
||||
pars[2] = ob_mega->current_dir;
|
||||
|
Loading…
x
Reference in New Issue
Block a user