From 61d3ba8e0f1d975e70dee7bf617ea43444d394a0 Mon Sep 17 00:00:00 2001 From: goodale Date: Wed, 7 Jul 1999 13:48:34 +0000 Subject: If there is no = before the end of the line discards the tokens collected so far. This stops it continuing collecting the name of a parameter across newlines. Note that this bug will also be there in Cactus 3.0. Tom git-svn-id: http://svn.cactuscode.org/flesh/trunk@686 17b73243-c579-4c4c-a9d2-2d5706c11dac --- src/util/ParseFile.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'src/util') diff --git a/src/util/ParseFile.c b/src/util/ParseFile.c index d6d5a97d..2e395580 100644 --- a/src/util/ParseFile.c +++ b/src/util/ParseFile.c @@ -89,11 +89,19 @@ int ParseFile(FILE *ifp, } /* End of line */ - if (c == '\n') { + if (c == '\n') + { + if(intoken) + { + fprintf(stderr, "Parse error at line %d. No value supplied.\n", lineno); + intoken = 0; + } + lineno ++; #ifdef DEBUG printf ("LINE %d\n",lineno); #endif + } /* Token character */ -- cgit v1.2.3