aboutsummaryrefslogtreecommitdiff
path: root/engines/lilliput
diff options
context:
space:
mode:
Diffstat (limited to 'engines/lilliput')
-rw-r--r--engines/lilliput/detection.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/engines/lilliput/detection.cpp b/engines/lilliput/detection.cpp
index 466c89e362..eb65ad2d64 100644
--- a/engines/lilliput/detection.cpp
+++ b/engines/lilliput/detection.cpp
@@ -227,9 +227,11 @@ SaveStateDescriptor LilliputMetaEngine::querySaveMetaInfos(const char *target, i
}
uint32 saveNameLength = file->readUint16BE();
- char saveName[256];
- file->read(saveName, saveNameLength);
- saveName[saveNameLength] = 0;
+ Common::String saveName;
+ for (uint32 i = 0; i < saveNameLength; ++i) {
+ char curChr = file->readByte();
+ saveName += curChr;
+ }
SaveStateDescriptor desc(slot, saveName);