diff --git a/source/locs.c b/source/locs.c index 62446aa..f570dad 100644 --- a/source/locs.c +++ b/source/locs.c @@ -141,8 +141,10 @@ locs_load (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); }