diff options
author | dgp <dgp@users.sourceforge.net> | 2014-02-03 22:58:36 (GMT) |
---|---|---|
committer | dgp <dgp@users.sourceforge.net> | 2014-02-03 22:58:36 (GMT) |
commit | b952380a515955264c2a82e6ec784268a69b2042 (patch) | |
tree | a2879a7012f4634b3e2703b20fd9fbf53a074f48 /generic | |
parent | a85ebc21de9b4010d0733a56197fecbb6f3d3a3b (diff) | |
parent | 009a17d3a03061610a2c281f18937e78e995855f (diff) | |
download | tcl-b952380a515955264c2a82e6ec784268a69b2042.zip tcl-b952380a515955264c2a82e6ec784268a69b2042.tar.gz tcl-b952380a515955264c2a82e6ec784268a69b2042.tar.bz2 |
merge 8.5
Diffstat (limited to 'generic')
-rw-r--r-- | generic/tclExecute.c | 8 |
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) { |