aboutsummaryrefslogtreecommitdiff
path: root/engines/gob
diff options
context:
space:
mode:
authorSven Hesse2011-05-05 20:44:58 +0200
committerSven Hesse2011-05-05 20:50:53 +0200
commit8e03a200ef53ce1e5d20590aae89fae0e640e873 (patch)
tree84b2b7ce81ce29d4bb436184b23e66ca455b307c /engines/gob
parent371b9cace7e911a762747a083128b73853632268 (diff)
downloadscummvm-rg350-8e03a200ef53ce1e5d20590aae89fae0e640e873.tar.gz
scummvm-rg350-8e03a200ef53ce1e5d20590aae89fae0e640e873.tar.bz2
scummvm-rg350-8e03a200ef53ce1e5d20590aae89fae0e640e873.zip
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.
Diffstat (limited to 'engines/gob')
-rw-r--r--engines/gob/save/savehandler.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/engines/gob/save/savehandler.cpp b/engines/gob/save/savehandler.cpp
index 8cb8274402..21102ae786 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';
}
}