[Scummvm-cvs-logs] scummvm master -> 8e03a200ef53ce1e5d20590aae89fae0e640e873

DrMcCoy drmccoy at drmccoy.de
Thu May 5 20:52: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:
8e03a200ef GOB: Fix a stupid typo in SlotFileIndexed::buildIndex()


Commit: 8e03a200ef53ce1e5d20590aae89fae0e640e873
    https://github.com/scummvm/scummvm/commit/8e03a200ef53ce1e5d20590aae89fae0e640e873
Author: Sven Hesse (drmccoy at users.sourceforge.net)
Date: 2011-05-05T11:50:53-07:00

Commit Message:
GOB: Fix a stupid typo in SlotFileIndexed::buildIndex()

This should fix bug #3295893.

The intention of this piece of code was to pad the first save slot
name with spaces until it's as long as the longest save slot name,
because the scripts use it to gauge the width of the save list.
Unfortunately, I messed up there, overwriting variable space directly
after the save names. In Urban Runner's case, this would be the list
of inventory items.

Changed paths:
    engines/gob/save/savehandler.cpp



diff --git a/engines/gob/save/savehandler.cpp b/engines/gob/save/savehandler.cpp
index 8cb8274..21102ae 100644
--- a/engines/gob/save/savehandler.cpp
+++ b/engines/gob/save/savehandler.cpp
@@ -113,8 +113,8 @@ void SlotFileIndexed::buildIndex(byte *buffer, SavePartInfo &info,
 	if (setLongest) {
 		uint32 slot0Len;
 		for (slot0Len = strlen((const char *) bufferStart); slot0Len < longest; slot0Len++)
-			buffer[slot0Len] = ' ';
-		buffer[slot0Len] = '\0';
+			bufferStart[slot0Len] = ' ';
+		bufferStart[slot0Len] = '\0';
 	}
 }
 






More information about the Scummvm-git-logs mailing list