summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2007-11-13 21:22:17 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2007-11-13 21:22:17 (GMT)
commitf315a019747b17af746eb751bf484f26dfb987a3 (patch)
tree246894a5ae630c84c89de1f5ebfc2ac59746161f
parentbef2dfa177efff3410551a2b960679d1cafbb60b (diff)
downloadtcl-f315a019747b17af746eb751bf484f26dfb987a3.zip
tcl-f315a019747b17af746eb751bf484f26dfb987a3.tar.gz
tcl-f315a019747b17af746eb751bf484f26dfb987a3.tar.bz2
Fix a bug in disassembly of INST_START_CMD instructions
-rw-r--r--generic/tclCompile.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/generic/tclCompile.c b/generic/tclCompile.c
index ce9f7e1..831b090 100644
--- a/generic/tclCompile.c
+++ b/generic/tclCompile.c
@@ -11,7 +11,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclCompile.c,v 1.138 2007/11/12 02:07:19 hobbs Exp $
+ * RCS: @(#) $Id: tclCompile.c,v 1.139 2007/11/13 21:22:17 dkf Exp $
*/
#include "tclInt.h"
@@ -3621,7 +3621,7 @@ FormatInstruction(
int opnd = 0, i, j, numBytes = 1;
int localCt = procPtr ? procPtr->numCompiledLocals : 0;
CompiledLocal *localPtr = procPtr ? procPtr->firstLocalPtr : NULL;
- char suffixBuffer[64]; /* Additional info to print after main opcode
+ char suffixBuffer[128]; /* Additional info to print after main opcode
* and immediates. */
char *suffixSrc = NULL;
Tcl_Obj *suffixObj = NULL;
@@ -3662,7 +3662,8 @@ FormatInstruction(
if (opCode == INST_PUSH4) {
suffixObj = codePtr->objArrayPtr[opnd];
} else if (opCode == INST_START_CMD && opnd != 1) {
- sprintf(suffixBuffer, ", %u cmds start here", opnd);
+ sprintf(suffixBuffer+strlen(suffixBuffer),
+ ", %u cmds start here", opnd);
}
Tcl_AppendPrintfToObj(bufferObj, "%u ", (unsigned int) opnd);
if (instDesc->opTypes[i] == OPERAND_AUX4) {