mirror of
https://github.com/XProger/OpenLara.git
synced 2025-01-29 10:38:04 +01:00
Fix null dereference caused by osFixFileName, remove stray semicolon (#467)
This commit is contained in:
parent
7a021b6ede
commit
d2e363db88
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user