summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--generic/tclCompile.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/generic/tclCompile.c b/generic/tclCompile.c
index 2dce72e..48b5641 100644
--- a/generic/tclCompile.c
+++ b/generic/tclCompile.c
@@ -3270,7 +3270,14 @@ IsLocalScalar(varName, length)
char *lastChar = varName + (length - 1);
for (p = varName; p <= lastChar; p++) {
- if (CHAR_TYPE(p, lastChar) != TCL_NORMAL) {
+ if ((CHAR_TYPE(p, lastChar) != TCL_NORMAL) &&
+ (CHAR_TYPE(p, lastChar) != TCL_COMMAND_END)) {
+ /*
+ * TCL_COMMAND_END is returned for the last character
+ * of the string. By this point we know it isn't
+ * an array or namespace reference.
+ */
+
return 0;
}
if (*p == '(') {