]> granicus.if.org Git - graphviz/commitdiff
Fix bug in previous version: technically, '\0' is a control character
authorerg <devnull@localhost>
Thu, 16 Feb 2006 22:54:13 +0000 (22:54 +0000)
committererg <devnull@localhost>
Thu, 16 Feb 2006 22:54:13 +0000 (22:54 +0000)
but we can't treat it as white space.

lib/graph/lexer.c

index e9dd6b7a182324f79d5b1502e6cbb018dda1bf5c..aaa56ea4b8a49ea5a3a7b5eb690cdeb0f1c2c791 100644 (file)
@@ -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