summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2014-02-03 22:58:36 (GMT)
committerdgp <dgp@users.sourceforge.net>2014-02-03 22:58:36 (GMT)
commit9f92115d2db18b4bc244a6d7a48fa7cf83129b94 (patch)
treea2879a7012f4634b3e2703b20fd9fbf53a074f48 /generic
parente12cc95f12b130e5b9cce4c1eeef3bfc43e28676 (diff)
parentf77ffeb9b26f49ef66f77929848f2ac9486f1081 (diff)
downloadtcl-9f92115d2db18b4bc244a6d7a48fa7cf83129b94.zip
tcl-9f92115d2db18b4bc244a6d7a48fa7cf83129b94.tar.gz
tcl-9f92115d2db18b4bc244a6d7a48fa7cf83129b94.tar.bz2
merge 8.5
Diffstat (limited to 'generic')
-rw-r--r--generic/tclExecute.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/generic/tclExecute.c b/generic/tclExecute.c
index e657828..2e396e8 100644
--- a/generic/tclExecute.c
+++ b/generic/tclExecute.c
@@ -73,7 +73,7 @@ int tclTraceExec = 0;
* disjoint for backward-compatability reasons.
*/
-static const char *operatorStrings[] = {
+static const char *const operatorStrings[] = {
"||", "&&", "|", "^", "&", "==", "!=", "<", ">", "<=", ">=", "<<", ">>",
"+", "-", "*", "/", "%", "+", "-", "~", "!",
"BUILTIN FUNCTION", "FUNCTION",
@@ -86,7 +86,7 @@ static const char *operatorStrings[] = {
*/
#ifdef TCL_COMPILE_DEBUG
-static const char *resultStrings[] = {
+static const char *const resultStrings[] = {
"TCL_OK", "TCL_ERROR", "TCL_RETURN", "TCL_BREAK", "TCL_CONTINUE"
};
#endif
@@ -7710,10 +7710,12 @@ IllegalExprOperandType(
ClientData ptr;
int type;
unsigned char opcode = *pc;
- const char *description, *operator = operatorStrings[opcode - INST_LOR];
+ const char *description, *operator = "unknown";
if (opcode == INST_EXPON) {
operator = "**";
+ } else if (opcode <= INST_STR_NEQ) {
+ operator = operatorStrings[opcode - INST_LOR];
}
if (GetNumberFromObj(NULL, opndPtr, &ptr, &type) != TCL_OK) {