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