aboutsummaryrefslogtreecommitdiff
path: root/gcc/gcc.c
diff options
context:
space:
mode:
authorJim Wilson <wilson@cygnus.com>1998-05-07 20:49:41 +0000
committerJim Wilson <wilson@gcc.gnu.org>1998-05-07 13:49:41 -0700
commitbbeb7b6556c304085c8e2b4b1a600e0805e76936 (patch)
treee6db0b9a566e4420806fa7ce2f02085d2ebb4576 /gcc/gcc.c
parent02e562027411e550d6df7b3d995d2235e0b0c98a (diff)
downloadgcc-bbeb7b6556c304085c8e2b4b1a600e0805e76936.zip
gcc-bbeb7b6556c304085c8e2b4b1a600e0805e76936.tar.gz
gcc-bbeb7b6556c304085c8e2b4b1a600e0805e76936.tar.bz2
Fix specs file problem reported by Nathan Myers.
* gcc.c (read_specs): Handle missing blank line at end of specs file. From-SVN: r19622
Diffstat (limited to 'gcc/gcc.c')
-rw-r--r--gcc/gcc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/gcc.c b/gcc/gcc.c
index 1941aed..f2efe56 100644
--- a/gcc/gcc.c
+++ b/gcc/gcc.c
@@ -1557,8 +1557,8 @@ read_specs (filename, main_p)
fatal ("specs file malformed after %d characters", p - buffer);
p1 = p;
- /* Find next blank line. */
- while (*p1 && !(*p1 == '\n' && p1[1] == '\n'))
+ /* Find next blank line or end of string. */
+ while (*p1 && !(*p1 == '\n' && (p1[1] == '\n' || p1[1] == '\0')))
p1++;
/* Specs end at the blank line and do not include the newline. */