1
0
mirror of https://github.com/XProger/OpenLara.git synced 2025-08-10 23:24:06 +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
#define MAX_FILES 4096
char* gFiles[MAX_FILES];
const char* gEmpty = "";
int32 gFilesCount;
void addDir(char* path)
@@ -386,7 +387,7 @@ const char* osFixFileName(const char* fileName)
return gFiles[i];
}
}
return NULL;
return gEmpty;
}
// system

View File

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