summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2011-09-06 20:37:58 (GMT)
committerdgp <dgp@users.sourceforge.net>2011-09-06 20:37:58 (GMT)
commitce6c10424834a81beb5c714d76a1bd6670d320b5 (patch)
treecaf9e7c12e65d798f82ed89b62d9575a89bc8f41 /generic
parent2f2d04eac2f4d40cf16733c6803429519a649be4 (diff)
downloadtcl-ce6c10424834a81beb5c714d76a1bd6670d320b5.zip
tcl-ce6c10424834a81beb5c714d76a1bd6670d320b5.tar.gz
tcl-ce6c10424834a81beb5c714d76a1bd6670d320b5.tar.bz2
Don't extend numbers with non-alphanumeric characters into barewords.
Diffstat (limited to 'generic')
-rw-r--r--generic/tclCompExpr.c6
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;