aboutsummaryrefslogtreecommitdiff
path: root/scumm
diff options
context:
space:
mode:
authorGregory Montoir2005-10-18 19:16:02 +0000
committerGregory Montoir2005-10-18 19:16:02 +0000
commit953b35a8c349200a2c25e58db1ec226e7de89755 (patch)
tree68a7c5236b0d1e5283e574d736761771920a99b8 /scumm
parentbe8cd9e69a3d7ad7438cede27e331fdee2e479c4 (diff)
downloadscummvm-rg350-953b35a8c349200a2c25e58db1ec226e7de89755.tar.gz
scummvm-rg350-953b35a8c349200a2c25e58db1ec226e7de89755.tar.bz2
scummvm-rg350-953b35a8c349200a2c25e58db1ec226e7de89755.zip
Fixed invalid memory reads, this helps thinker1 demo
svn-id: r19156
Diffstat (limited to 'scumm')
-rw-r--r--scumm/script_v72he.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/scumm/script_v72he.cpp b/scumm/script_v72he.cpp
index 0bd956ad43..9a393d3eaa 100644
--- a/scumm/script_v72he.cpp
+++ b/scumm/script_v72he.cpp
@@ -1765,9 +1765,11 @@ void ScummEngine_v72he::o72_openFile() {
// There are Macintosh specific versions of HE7.2 games.
if (_heversion >= 80 && _substResFileNameIndex > 0) {
char buf1[128];
-
+ buf1[0] = '\0';
generateSubstResFileName((char *)filename, buf1, sizeof(buf1));
- strcpy((char *)filename, buf1);
+ if (buf1[0]) {
+ strcpy((char *)filename, buf1);
+ }
}
int r = convertFilePath(filename);