From 948bf54c8b2af1b9b4351b4804be09b53f757fa4 Mon Sep 17 00:00:00 2001 From: Adam Heath Date: Thu, 29 Aug 2002 19:28:16 +0000 Subject: [PATCH] Check for eof before we getc(), not after. --- ChangeLog | 4 ++++ lib/parse.c | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 7493186b..3bb5186f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +Thu Aug 29 14:31:22 CDT 2002 Adam Heath + + * lib/parse.c: Check for eof before we getc(), not after. + Sat Aug 24 15:36:41 CDT 2002 Adam Heath * scripts/install-info.pl: Previous install-infos(before 1.10) handled diff --git a/lib/parse.c b/lib/parse.c index 7133d923..1e84f948 100644 --- a/lib/parse.c +++ b/lib/parse.c @@ -172,8 +172,8 @@ int parsedb(const char *filename, enum parsedbflags flags, for (;;) { if (c == '\n' || c == MSDOS_EOF_CHAR) { lno++; - c= getc_mmap(dataptr); if (EOF_mmap(dataptr, endptr)) break; + c= getc_mmap(dataptr); /* Found double eol, or start of new field */ if (EOF_mmap(dataptr, endptr) || c == '\n' || !isspace(c)) break; ungetc_mmap(c,dataptr, data); -- 2.39.5