summaryrefslogtreecommitdiffstats
path: root/generic/tclDisassemble.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2018-02-14 22:42:00 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2018-02-14 22:42:00 (GMT)
commit494a47ee6e15ade053dcbb81f273b71c3322c62c (patch)
treed606d444b32dd1606f9bb62ecd4ed08275828860 /generic/tclDisassemble.c
parentf9a0feeb4b3b8610f7a733cf15e608f6815e163f (diff)
parente62743b6eeac0cf185b020fd46b4c7c06e4a49d0 (diff)
downloadtcl-494a47ee6e15ade053dcbb81f273b71c3322c62c.zip
tcl-494a47ee6e15ade053dcbb81f273b71c3322c62c.tar.gz
tcl-494a47ee6e15ade053dcbb81f273b71c3322c62c.tar.bz2
Merge core-8-branch
Diffstat (limited to 'generic/tclDisassemble.c')
-rw-r--r--generic/tclDisassemble.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/generic/tclDisassemble.c b/generic/tclDisassemble.c
index ff6d0a0..c1b0e83 100644
--- a/generic/tclDisassemble.c
+++ b/generic/tclDisassemble.c
@@ -817,12 +817,11 @@ static void
UpdateStringOfInstName(
Tcl_Obj *objPtr)
{
- int inst = (int)objPtr->internalRep.wideValue;
+ size_t len, inst = (size_t)objPtr->internalRep.wideValue;
char *s, buf[20];
- int len;
- if ((inst < 0) || (inst > LAST_INST_OPCODE)) {
- sprintf(buf, "inst_%d", inst);
+ if (inst > LAST_INST_OPCODE) {
+ sprintf(buf, "inst_%" TCL_Z_MODIFIER "d", inst);
s = buf;
} else {
s = (char *) tclInstructionTable[inst].name;