summaryrefslogtreecommitdiffstats
path: root/src/core/CdStreamPosix.cpp
diff options
context:
space:
mode:
authorFilip Gawin <filip.gawin@zoho.com>2020-07-26 00:11:13 +0200
committerFilip Gawin <filip.gawin@zoho.com>2020-07-26 00:11:13 +0200
commit98ec7bdaf9047a16a27048202bcebf3fc1ef97d2 (patch)
tree09c2861d9179fb8df15b693e9635dec821bf6515 /src/core/CdStreamPosix.cpp
parentfix windows build, don't use crossplatform (diff)
downloadre3-98ec7bdaf9047a16a27048202bcebf3fc1ef97d2.tar
re3-98ec7bdaf9047a16a27048202bcebf3fc1ef97d2.tar.gz
re3-98ec7bdaf9047a16a27048202bcebf3fc1ef97d2.tar.bz2
re3-98ec7bdaf9047a16a27048202bcebf3fc1ef97d2.tar.lz
re3-98ec7bdaf9047a16a27048202bcebf3fc1ef97d2.tar.xz
re3-98ec7bdaf9047a16a27048202bcebf3fc1ef97d2.tar.zst
re3-98ec7bdaf9047a16a27048202bcebf3fc1ef97d2.zip
Diffstat (limited to 'src/core/CdStreamPosix.cpp')
-rw-r--r--src/core/CdStreamPosix.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/core/CdStreamPosix.cpp b/src/core/CdStreamPosix.cpp
index 4d6bcdab..073ba909 100644
--- a/src/core/CdStreamPosix.cpp
+++ b/src/core/CdStreamPosix.cpp
@@ -189,7 +189,7 @@ GetGTA3ImgSize(void)
realpath(gImgNames[0], path);
if (stat(path, &statbuf) == -1) {
// Try case-insensitivity
- char *r = (char*)alloca(strlen(gImgNames[0]) + 2);
+ char *r = (char*)alloca(strlen(gImgNames[0]) + 4);
if (casepath(gImgNames[0], r))
{
realpath(r, path);
@@ -460,7 +460,7 @@ CdStreamAddImage(char const *path)
// Fix case sensitivity and backslashes.
if (gImgFiles[gNumImages] == -1) {
- char *r = (char*)alloca(strlen(path) + 2);
+ char *r = (char*)alloca(strlen(path) + 4);
if (casepath(path, r))
{
gImgFiles[gNumImages] = open(r, _gdwCdStreamFlags);