[Scummvm-cvs-logs] scummvm master -> b82f40d9061072e3748868b16f75a8cb767afce0

wjp wjp at usecode.org
Thu Aug 18 00:00:43 CEST 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:
b82f40d906 DREAMWEB: Fix crash when loading some saves


Commit: b82f40d9061072e3748868b16f75a8cb767afce0
    https://github.com/scummvm/scummvm/commit/b82f40d9061072e3748868b16f75a8cb767afce0
Author: Willem Jan Palenstijn (wjp at usecode.org)
Date: 2011-08-17T14:57:04-07:00

Commit Message:
DREAMWEB: Fix crash when loading some saves

findsource() has the hidden side effect of modifying kTakeoff,
and the getreelframeax() conversion reordered a findsource() call
and kTakeoff access in e78a5a2b08012dfe786da6d77abcc052436ace9c.

Changed paths:
    engines/dreamweb/sprite.cpp



diff --git a/engines/dreamweb/sprite.cpp b/engines/dreamweb/sprite.cpp
index 2129d1c..506d0fb 100644
--- a/engines/dreamweb/sprite.cpp
+++ b/engines/dreamweb/sprite.cpp
@@ -565,8 +565,9 @@ void DreamGenContext::showgamereel() {
 
 const Frame *DreamGenContext::getreelframeax(uint16 frame) {
 	data.word(kCurrentframe) = frame;
+	Frame* source = findsourceCPP();
 	uint16 offset = data.word(kCurrentframe) - data.word(kTakeoff);
-	return findsourceCPP() + offset;
+	return source + offset;
 }
 
 void DreamGenContext::showrain() {






More information about the Scummvm-git-logs mailing list