From: erg Date: Thu, 16 Feb 2006 22:54:13 +0000 (+0000) Subject: Fix bug in previous version: technically, '\0' is a control character X-Git-Tag: LAST_LIBGRAPH~32^2~6794 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=249a839e101d414dba86fa1889cee1a4cb26f158;p=graphviz Fix bug in previous version: technically, '\0' is a control character but we can't treat it as white space. --- diff --git a/lib/graph/lexer.c b/lib/graph/lexer.c index e9dd6b7a1..aaa56ea4b 100644 --- a/lib/graph/lexer.c +++ b/lib/graph/lexer.c @@ -66,7 +66,7 @@ void aglexinit(FILE * fp, gets_f mygets) (Lexer_gets) (AG.linebuf, 0, fp); /* reset mygets */ } -#define ISSPACE(c) (isspace(c) || iscntrl(c)) +#define ISSPACE(c) ((c != 0) && ((isspace(c) || iscntrl(c)))) /* skip leading white space and comments in a string p * whitespace includes control characters