mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-10 23:32:09 +00:00
hopefully handle \r\n endings
This commit is contained in:
parent
2b26072c8f
commit
9e6be1e029
1 changed files with 4 additions and 2 deletions
|
@ -672,7 +672,8 @@ LoadPortals (char *name)
|
|||
|
||||
line = Qgetline (f);
|
||||
|
||||
if (line && !strcmp (line, PORTALFILE "\n")) {
|
||||
if (line && (!strcmp (line, PORTALFILE "\n")
|
||||
|| !strcmp (line, PORTALFILE "\r\n"))) {
|
||||
line = Qgetline (f);
|
||||
if (!line || sscanf (line, "%i\n", &portalclusters) != 1)
|
||||
Sys_Error ("LoadPortals: failed to read header");
|
||||
|
@ -680,7 +681,8 @@ LoadPortals (char *name)
|
|||
if (!line || sscanf (line, "%i\n", &numportals) != 1)
|
||||
Sys_Error ("LoadPortals: failed to read header");
|
||||
numrealleafs = portalclusters;
|
||||
} else if ((line && !strcmp (line, PORTALFILE_AM "\n"))) {
|
||||
} else if (line && (!strcmp (line, PORTALFILE_AM "\n")
|
||||
|| !strcmp (line, PORTALFILE_AM "\r\n"))) {
|
||||
line = Qgetline (f);
|
||||
if (!line || sscanf (line, "%i\n", &portalclusters) != 1)
|
||||
Sys_Error ("LoadPortals: failed to read header");
|
||||
|
|
Loading…
Reference in a new issue