diff options
author | dgp <dgp@users.sourceforge.net> | 2011-09-06 20:37:58 (GMT) |
---|---|---|
committer | dgp <dgp@users.sourceforge.net> | 2011-09-06 20:37:58 (GMT) |
commit | ce6c10424834a81beb5c714d76a1bd6670d320b5 (patch) | |
tree | caf9e7c12e65d798f82ed89b62d9575a89bc8f41 | |
parent | 2f2d04eac2f4d40cf16733c6803429519a649be4 (diff) | |
download | tcl-ce6c10424834a81beb5c714d76a1bd6670d320b5.zip tcl-ce6c10424834a81beb5c714d76a1bd6670d320b5.tar.gz tcl-ce6c10424834a81beb5c714d76a1bd6670d320b5.tar.bz2 |
Don't extend numbers with non-alphanumeric characters into barewords.
-rw-r--r-- | generic/tclCompExpr.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/generic/tclCompExpr.c b/generic/tclCompExpr.c index 077d595..3fdcc22 100644 --- a/generic/tclCompExpr.c +++ b/generic/tclCompExpr.c @@ -1932,6 +1932,12 @@ ParseLexeme( return (end-start); } else { unsigned char lexeme; + const char *p = start; + while (p < end) { + if (!isalnum(UCHAR(*p++))) { + goto number; + } + } ParseLexeme(end, numBytes-(end-start), &lexeme, NULL); if ((NODE_TYPE & lexeme) == BINARY) { goto number; |