(collapse_continuations): Fix skipping of trailing \s so it can never
authorRoland McGrath <roland@redhat.com>
Tue, 12 Dec 1995 04:24:17 +0000 (04:24 +0000)
committerRoland McGrath <roland@redhat.com>
Tue, 12 Dec 1995 04:24:17 +0000 (04:24 +0000)
dereference before the beginning of the array.

misc.c

diff --git a/misc.c b/misc.c
index a7e9e711f4f131ab967fd50ea1324f1417f00989..88dfd60c7f98c02bc2a4c159eac9599e4e064074 100644 (file)
--- a/misc.c
+++ b/misc.c
@@ -50,9 +50,8 @@ collapse_continuations (line)
     return;
 
   out = in;
-  if (out > line)
-    while (out[-1] == '\\')
-      --out;
+  while (out > line && out[-1] == '\\')
+    --out;
 
   while (*in != '\0')
     {