From 6be99353a1bd6328667d431bf36ec6e375ea9065 Mon Sep 17 00:00:00 2001 From: Bill Currie Date: Tue, 27 Nov 2001 21:25:54 +0000 Subject: [PATCH] backport the locs reading fix --- source/locs.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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); }