[Scummvm-cvs-logs] scummvm master -> 4178ad6b681d32de567b00833b18bf992cbffd92
wjp
wjp at usecode.org
Sun Dec 18 12:39:39 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:
4178ad6b68 DREAMWEB: Fix ReelRoutine terminator saving/loading
Commit: 4178ad6b681d32de567b00833b18bf992cbffd92
https://github.com/scummvm/scummvm/commit/4178ad6b681d32de567b00833b18bf992cbffd92
Author: Willem Jan Palenstijn (wjp at usecode.org)
Date: 2011-12-18T03:38:53-08:00
Commit Message:
DREAMWEB: Fix ReelRoutine terminator saving/loading
Changed paths:
engines/dreamweb/saveload.cpp
diff --git a/engines/dreamweb/saveload.cpp b/engines/dreamweb/saveload.cpp
index 52f2851..4001cb1 100644
--- a/engines/dreamweb/saveload.cpp
+++ b/engines/dreamweb/saveload.cpp
@@ -432,9 +432,11 @@ void DreamGenContext::savePosition(unsigned int slot, const char *descbuf) {
// TODO: Convert more to serializer?
Common::Serializer s(0, outSaveFile);
- for (unsigned int i = 0; 8 * i < kLenofreelrouts; ++i) {
- syncReelRoutine(s, (ReelRoutine *)data.ptr(kReelroutines + 8 * i, 8));
+ for (unsigned int i = 0; 8*i < kLenofreelrouts - 1; ++i) {
+ syncReelRoutine(s, (ReelRoutine *)data.ptr(kReelroutines + 8*i, 8));
}
+ // Terminator
+ s.syncAsByte(*data.ptr(kReelroutines + kLenofreelrouts - 1, 1));
// ScummVM data block
outSaveFile->writeUint32BE(SCUMMVM_HEADER);
@@ -498,9 +500,11 @@ void DreamGenContext::loadPosition(unsigned int slot) {
// TODO: Use serializer for more
Common::Serializer s(inSaveFile, 0);
- for (unsigned int i = 0; 8 * i < kLenofreelrouts; ++i) {
- syncReelRoutine(s, (ReelRoutine *)data.ptr(kReelroutines + 8 * i, 8));
+ for (unsigned int i = 0; 8*i < kLenofreelrouts - 1; ++i) {
+ syncReelRoutine(s, (ReelRoutine *)data.ptr(kReelroutines + 8*i, 8));
}
+ // Terminator
+ s.syncAsByte(*data.ptr(kReelroutines + kLenofreelrouts - 1, 1));
// Check if there's a ScummVM data block
if (header.len(6) == SCUMMVM_BLOCK_MAGIC_SIZE) {
More information about the Scummvm-git-logs
mailing list