aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTravis Howell2003-03-25 12:25:06 +0000
committerTravis Howell2003-03-25 12:25:06 +0000
commit2ef250423a7d5b6fc524d73198cee1cdf924d419 (patch)
treebbf58f40ce53c457e39eb18d3a995391b7034a4f
parent76548862f9c95b5a78865004ca4c46bd275bdaaf (diff)
downloadscummvm-rg350-2ef250423a7d5b6fc524d73198cee1cdf924d419.tar.gz
scummvm-rg350-2ef250423a7d5b6fc524d73198cee1cdf924d419.tar.bz2
scummvm-rg350-2ef250423a7d5b6fc524d73198cee1cdf924d419.zip
Bug fix from ludde
svn-id: r6859
-rw-r--r--simon/res.cpp2
-rw-r--r--simon/sound.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/simon/res.cpp b/simon/res.cpp
index b7fe38f4e6..b8e4b11c03 100644
--- a/simon/res.cpp
+++ b/simon/res.cpp
@@ -103,7 +103,7 @@ void SimonState::loadGamePcFile(const char *filename) {
in->open(filename, _gameDataPath);
if (in->isOpen() == false) {
char *filename2;
- filename2 = (char *)malloc(strlen(filename) + 1);
+ filename2 = (char *)malloc(strlen(filename) + 2);
strcpy(filename2, filename);
strcat(filename2, ".");
in->open(filename2, _gameDataPath);
diff --git a/simon/sound.cpp b/simon/sound.cpp
index 6e7724a44e..c90dddbca4 100644
--- a/simon/sound.cpp
+++ b/simon/sound.cpp
@@ -118,7 +118,7 @@ void SimonSound::readSfxFile(const char *filename, const char *gameDataPath) {
if (file->isOpen() == false) {
char *filename2;
- filename2 = (char *)malloc(strlen(filename) + 1);
+ filename2 = (char *)malloc(strlen(filename) + 2);
strcpy(filename2, filename);
strcat(filename2, ".");
file->open(filename2, gameDataPath);