mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-01-17 22:50:51 +00:00
take care of \r*\n line endings
This commit is contained in:
parent
67fde0c492
commit
c4646b9685
2 changed files with 6 additions and 2 deletions
|
@ -147,8 +147,10 @@ locs_load (const char *filename)
|
|||
t2[0] = '\0';
|
||||
// handle dos format lines (COM_FOpenFile is binary only)
|
||||
// and unix is effectively binary only anyway
|
||||
if (t2 > t1 && t2[-1] == '\r')
|
||||
while (t2 > t1 && t2[-1] == '\r') {
|
||||
t2[-1] = '\0';
|
||||
t2--;
|
||||
}
|
||||
}
|
||||
locs_add (loc, t1);
|
||||
}
|
||||
|
|
|
@ -148,8 +148,10 @@ locs_load (const char *filename)
|
|||
t2[0] = '\0';
|
||||
// handle dos format lines (COM_FOpenFile is binary only)
|
||||
// and unix is effectively binary only anyway
|
||||
if (t2 > t1 && t2[-1] == '\r')
|
||||
while (t2 > t1 && t2[-1] == '\r') {
|
||||
t2[-1] = '\0';
|
||||
t2--;
|
||||
}
|
||||
}
|
||||
locs_add (loc, t1);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue