From 0c71b8fc46224d3797677aa37fcffe642bc13b72 Mon Sep 17 00:00:00 2001 From: dkf Date: Wed, 7 May 2008 09:07:06 +0000 Subject: Fix off-by-one error that caused crashes. D'oh! --- ChangeLog | 7 +++++++ generic/tclCompCmds.c | 4 ++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 679d0cd..411943c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2008-05-07 Donal K. Fellows + + * generic/tclCompCmds.c (TclCompileDictAppendCmd): Fix silly + off-by one error that caused a crash every time a compiled 'dict + append' with more than one argument was used. Found by Colin + McCormack. + 2008-05-02 Pat Thoyts * generic/tclBasic.c: Converted the [binary] command into an diff --git a/generic/tclCompCmds.c b/generic/tclCompCmds.c index 9fa3bf6..87cb891 100644 --- a/generic/tclCompCmds.c +++ b/generic/tclCompCmds.c @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCompCmds.c,v 1.143 2008/03/16 17:00:43 dkf Exp $ + * RCS: @(#) $Id: tclCompCmds.c,v 1.144 2008/05/07 09:07:11 dkf Exp $ */ #include "tclInt.h" @@ -1215,7 +1215,7 @@ TclCompileDictAppendCmd( tokenPtr = TokenAfter(tokenPtr); } if (parsePtr->numWords > 4) { - TclEmitInstInt1(INST_CONCAT1, parsePtr->numWords-2, envPtr); + TclEmitInstInt1(INST_CONCAT1, parsePtr->numWords-3, envPtr); } /* -- cgit v0.12