summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2008-05-07 09:07:06 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2008-05-07 09:07:06 (GMT)
commit0c71b8fc46224d3797677aa37fcffe642bc13b72 (patch)
treeada928848c83fd43ae6fe68949af4e333ea92343
parent15ea311f9c6ca61c783cb383a9579b63e56aac83 (diff)
downloadtcl-0c71b8fc46224d3797677aa37fcffe642bc13b72.zip
tcl-0c71b8fc46224d3797677aa37fcffe642bc13b72.tar.gz
tcl-0c71b8fc46224d3797677aa37fcffe642bc13b72.tar.bz2
Fix off-by-one error that caused crashes. D'oh!
-rw-r--r--ChangeLog7
-rw-r--r--generic/tclCompCmds.c4
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 <dkf@cspool38.cs.man.ac.uk>
+
+ * 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 <patthoyts@users.sourceforge.net>
* 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);
}
/*