mirror of
https://github.com/Shpoike/Quakespasm.git
synced 2024-11-10 07:21:58 +00:00
Fix bogus extra localization entries on Windows
Due to CRLF translation the value returned by fread in text mode can be less than the size of the file, leaving bogus data at the end of the buffer. Since the parser can already handle CRLF-terminated lines, and when reading directly from QuakeEX.kpf there would be no CRLF translation anyway, we can just open the file in binary mode.
This commit is contained in:
parent
b61a736c8c
commit
9d7f9eac6f
1 changed files with 1 additions and 1 deletions
|
@ -2530,7 +2530,7 @@ void LOC_LoadFile (const char *file)
|
|||
Con_Printf("\nLanguage initialization\n");
|
||||
|
||||
q_snprintf(path, sizeof(path), "%s/%s", com_basedir, file);
|
||||
fp = fopen(path, "r");
|
||||
fp = fopen(path, "rb");
|
||||
if (!fp) goto fail;
|
||||
fseek(fp, 0, SEEK_END);
|
||||
i = ftell(fp);
|
||||
|
|
Loading…
Reference in a new issue