mirror of
https://github.com/rehlds/rehlds.git
synced 2025-02-05 02:00:34 +03:00
Fix null or empty input string in COM_LoadFile (FS_Open with input empty string "" will succeed on some POSIX systems)
Resolved #919
This commit is contained in:
parent
3dc9f8c92d
commit
be0e1c843b
@ -1995,6 +1995,9 @@ int EXT_FUNC COM_FileSize(const char *filename)
|
|||||||
|
|
||||||
unsigned char* EXT_FUNC COM_LoadFile(const char *path, int usehunk, int *pLength)
|
unsigned char* EXT_FUNC COM_LoadFile(const char *path, int usehunk, int *pLength)
|
||||||
{
|
{
|
||||||
|
if (!path || !path[0])
|
||||||
|
return NULL;
|
||||||
|
|
||||||
char base[MAX_PATH];
|
char base[MAX_PATH];
|
||||||
unsigned char *buf = NULL;
|
unsigned char *buf = NULL;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user