fix nhl_loadlua() failures on Windows

The [dlb_]fopen() requires an RDBMODE argument on Windows.
ftell(), fseek(), and fread() interactions can be problematic otherwise.
This commit is contained in:
nhmall
2021-08-22 19:15:03 -04:00
parent 6dc99f69b7
commit 07fadd5e69
2 changed files with 4 additions and 1 deletions

View File

@@ -1244,7 +1244,7 @@ nhl_loadlua(lua_State *L, const char *fname)
if we did, we could choose between "nhdat(<fname>)" and "<fname>"
but since we don't, compromise */
Sprintf(altfname, "(%s)", fname);
fh = dlb_fopen(fname, "r");
fh = dlb_fopen(fname, RDBMODE);
if (!fh) {
impossible("nhl_loadlua: Error loading %s", altfname);
ret = FALSE;