mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-01-18 23:11:38 +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);
|
line = Qgetline (f);
|
||||||
|
|
||||||
if (line && !strcmp (line, PORTALFILE "\n")) {
|
if (line && (!strcmp (line, PORTALFILE "\n")
|
||||||
|
|| !strcmp (line, PORTALFILE "\r\n"))) {
|
||||||
line = Qgetline (f);
|
line = Qgetline (f);
|
||||||
if (!line || sscanf (line, "%i\n", &portalclusters) != 1)
|
if (!line || sscanf (line, "%i\n", &portalclusters) != 1)
|
||||||
Sys_Error ("LoadPortals: failed to read header");
|
Sys_Error ("LoadPortals: failed to read header");
|
||||||
|
@ -680,7 +681,8 @@ LoadPortals (char *name)
|
||||||
if (!line || sscanf (line, "%i\n", &numportals) != 1)
|
if (!line || sscanf (line, "%i\n", &numportals) != 1)
|
||||||
Sys_Error ("LoadPortals: failed to read header");
|
Sys_Error ("LoadPortals: failed to read header");
|
||||||
numrealleafs = portalclusters;
|
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);
|
line = Qgetline (f);
|
||||||
if (!line || sscanf (line, "%i\n", &portalclusters) != 1)
|
if (!line || sscanf (line, "%i\n", &portalclusters) != 1)
|
||||||
Sys_Error ("LoadPortals: failed to read header");
|
Sys_Error ("LoadPortals: failed to read header");
|
||||||
|
|
Loading…
Reference in a new issue