diff options
author | strangerke | 2011-02-28 21:58:10 +0100 |
---|---|---|
committer | strangerke | 2011-02-28 21:58:10 +0100 |
commit | 560eb302f16f2eb143c110a318904dd3a31009d0 (patch) | |
tree | e7e82db71b729412b33bfa0cbbc94c7abcfbc0ea /engines | |
parent | db536da8d3838bc69cd2c18f49d62e9151d425a5 (diff) | |
download | scummvm-rg350-560eb302f16f2eb143c110a318904dd3a31009d0.tar.gz scummvm-rg350-560eb302f16f2eb143c110a318904dd3a31009d0.tar.bz2 scummvm-rg350-560eb302f16f2eb143c110a318904dd3a31009d0.zip |
HUGO: Fix assert while saving under linux
Diffstat (limited to 'engines')
-rw-r--r-- | engines/hugo/schedule.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/engines/hugo/schedule.cpp b/engines/hugo/schedule.cpp index c7d932def7..71d52a7bca 100644 --- a/engines/hugo/schedule.cpp +++ b/engines/hugo/schedule.cpp @@ -708,12 +708,14 @@ void Scheduler::saveEvents(Common::WriteStream *f) { f->writeSint16BE(tailIndex); // Convert event ptrs to indexes + event_t saveEventArr[kMaxEvents]; // Convert event ptrs to indexes for (int16 i = 0; i < kMaxEvents; i++) { event_t *wrkEvent = &_events[i]; + saveEventArr[i] = *wrkEvent; // fix up action pointer (to do better) int16 index, subElem; - findAction(wrkEvent[i].action, &index, &subElem); + findAction(saveEventArr[i].action, &index, &subElem); f->writeSint16BE(index); f->writeSint16BE(subElem); f->writeByte((wrkEvent[i].localActionFl) ? 1 : 0); @@ -777,7 +779,6 @@ void Scheduler::saveActions(Common::WriteStream* f) const { /* * Find the index in the action list to be able to serialize the action to save game */ - void Scheduler::findAction(const act* action, int16* index, int16* subElem) { assert(index && subElem); |