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:
@@ -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
|
||||
|
@@ -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);
|
||||
|
Reference in New Issue
Block a user