changeset 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 90c6052410ce
children f50b4ea6cbfe
files eval.c
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
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;