Mercurial > ~dholland > hg > tradcpp > index.cgi
diff eval.c @ 63:5e24746d8335
Assert on trailing whitespace.
(it is supposed to have been pruned by the caller)
author | David A. Holland |
---|---|
date | Sun, 31 Mar 2013 02:02:16 -0400 |
parents | 2e25e55dba6b |
children | bd1b7a09da89 |
line wrap: on
line diff
--- a/eval.c Sun Mar 31 01:27:46 2013 -0400 +++ b/eval.c Sun Mar 31 02:02:16 2013 -0400 @@ -647,6 +647,8 @@ len = strspn(expr+pos, ws); pos += len; p->column += len; + /* trailing whitespace is supposed to have been pruned */ + assert(expr[pos] != '\0'); if (check_word(p, expr, pos, &len)) { pos += len; p->column += len;