2
0
mirror of https://github.com/rehlds/rehlds.git synced 2025-02-04 17:50:36 +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:
s1lentq 2022-05-25 18:39:14 +07:00
parent 3dc9f8c92d
commit be0e1c843b

View File

@ -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)
{
if (!path || !path[0])
return NULL;
char base[MAX_PATH];
unsigned char *buf = NULL;