FIL_ReadFileTag: use fopenfile

Fixes exec, for example, crashing the game if given
a directory. Test: `exec .`
This commit is contained in:
James R 2022-10-14 21:57:14 -07:00
parent 3bd3369fdc
commit 9761ab52d9

View file

@ -273,8 +273,8 @@ size_t FIL_ReadFileTag(char const *name, UINT8 **buffer, INT32 tag)
size_t count, length;
UINT8 *buf;
if (FIL_ReadFileOK(name))
handle = fopen(name, "rb");
//if (FIL_ReadFileOK(name))
handle = fopenfile(name, "rb");
if (!handle)
return 0;