From 2ef250423a7d5b6fc524d73198cee1cdf924d419 Mon Sep 17 00:00:00 2001 From: Travis Howell Date: Tue, 25 Mar 2003 12:25:06 +0000 Subject: Bug fix from ludde svn-id: r6859 --- simon/res.cpp | 2 +- simon/sound.cpp | 2 +- 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); -- cgit v1.2.3