1
0
mirror of https://github.com/XProger/OpenLara.git synced 2025-08-11 15:45:05 +02:00

Fix null dereference caused by osFixFileName, remove stray semicolon (#467)

This commit is contained in:
cookie99999
2023-06-28 18:54:59 -04:00
committed by GitHub
parent 7a021b6ede
commit d2e363db88
2 changed files with 3 additions and 2 deletions

View File

@@ -323,6 +323,7 @@ void joyUpdate() {
// filesystem // filesystem
#define MAX_FILES 4096 #define MAX_FILES 4096
char* gFiles[MAX_FILES]; char* gFiles[MAX_FILES];
const char* gEmpty = "";
int32 gFilesCount; int32 gFilesCount;
void addDir(char* path) void addDir(char* path)
@@ -386,7 +387,7 @@ const char* osFixFileName(const char* fileName)
return gFiles[i]; return gFiles[i];
} }
} }
return NULL; return gEmpty;
} }
// system // system

View File

@@ -1683,7 +1683,7 @@ extern void osWriteSlot (Stream *stream);
#ifdef _OS_LINUX #ifdef _OS_LINUX
extern const char* osFixFileName(const char* fileName); extern const char* osFixFileName(const char* fileName);
#endif; #endif
#ifdef _OS_WEB #ifdef _OS_WEB
extern void osDownload (Stream *stream); extern void osDownload (Stream *stream);