summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwelch <welch>1998-06-29 16:41:49 (GMT)
committerwelch <welch>1998-06-29 16:41:49 (GMT)
commit834bf0c2d0c47f3e16535483f56abbec82c04512 (patch)
tree84647953f3a259f0b85fdc2123d13aa434eb5cde
parent9f3869587887d7104addbb0423000d468cc198bd (diff)
downloadtcl-834bf0c2d0c47f3e16535483f56abbec82c04512.zip
tcl-834bf0c2d0c47f3e16535483f56abbec82c04512.tar.gz
tcl-834bf0c2d0c47f3e16535483f56abbec82c04512.tar.bz2
Fixed IsLocalScalar
-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 == '(') {