From f315a019747b17af746eb751bf484f26dfb987a3 Mon Sep 17 00:00:00 2001 From: dkf Date: Tue, 13 Nov 2007 21:22:17 +0000 Subject: Fix a bug in disassembly of INST_START_CMD instructions --- generic/tclCompile.c | 7 ++++--- 1 file 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) { -- cgit v0.12