[Scummvm-cvs-logs] scummvm master -> 560eb302f16f2eb143c110a318904dd3a31009d0

Strangerke arnaud.boutonne at gmail.com
Mon Feb 28 21:58:31 CET 2011


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
560eb302f1 HUGO: Fix assert while saving under linux


Commit: 560eb302f16f2eb143c110a318904dd3a31009d0
    https://github.com/scummvm/scummvm/commit/560eb302f16f2eb143c110a318904dd3a31009d0
Author: strangerke (arnaud.boutonne at gmail.com)
Date: 2011-02-28T12:58:10-08:00

Commit Message:
HUGO: Fix assert while saving under linux

Changed paths:
    engines/hugo/schedule.cpp



diff --git a/engines/hugo/schedule.cpp b/engines/hugo/schedule.cpp
index c7d932d..71d52a7 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);






More information about the Scummvm-git-logs mailing list