backport the locs reading fix

This commit is contained in:
Bill Currie 2001-11-27 21:25:54 +00:00
parent 86f6ce2265
commit 6be99353a1

View file

@ -141,8 +141,10 @@ locs_load (char *filename)
t2[0] = '\0'; t2[0] = '\0';
// handle dos format lines (COM_FOpenFile is binary only) // handle dos format lines (COM_FOpenFile is binary only)
// and unix is effectively binary only anyway // and unix is effectively binary only anyway
if (t2 > t1 && t2[-1] == '\r') while (t2 > t1 && t2[-1] == '\r') {
t2[-1] = '\0'; t2[-1] = '\0';
t2--;
}
} }
locs_add (loc, t1); locs_add (loc, t1);
} }