summaryrefslogtreecommitdiffstats
path: root/generic/tclCompCmds.c
diff options
context:
space:
mode:
authordgp <dgp@noemail.net>2003-04-07 20:02:47 (GMT)
committerdgp <dgp@noemail.net>2003-04-07 20:02:47 (GMT)
commit41f99496ede7cb65ef10ed6b8d69deaa9b822a9a (patch)
treef69a27577b2cbbdd28b4d313cce77e801c382e98 /generic/tclCompCmds.c
parent9da6399e866bc767f1bb629f89a4cde9b6b9105d (diff)
downloadtcl-41f99496ede7cb65ef10ed6b8d69deaa9b822a9a.zip
tcl-41f99496ede7cb65ef10ed6b8d69deaa9b822a9a.tar.gz
tcl-41f99496ede7cb65ef10ed6b8d69deaa9b822a9a.tar.bz2
* generic/tclCompCmds.c (TclCompileIfCmd): Corrected string limits of
arguments interpolated in error messages. [Bug 711371] FossilOrigin-Name: a05601f89d5b1b47b76c55673b773ba3ef46857f
Diffstat (limited to 'generic/tclCompCmds.c')
-rw-r--r--generic/tclCompCmds.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/generic/tclCompCmds.c b/generic/tclCompCmds.c
index ae3bb31..644b807 100644
--- a/generic/tclCompCmds.c
+++ b/generic/tclCompCmds.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: tclCompCmds.c,v 1.39 2003/02/07 01:07:05 mdejong Exp $
+ * RCS: @(#) $Id: tclCompCmds.c,v 1.39.2.1 2003/04/07 20:03:05 dgp Exp $
*/
#include "tclInt.h"
@@ -1196,8 +1196,8 @@ TclCompileIfCmd(interp, parsePtr, envPtr)
}
if (wordIdx >= numWords) {
sprintf(buffer,
- "wrong # args: no expression after \"%.30s\" argument",
- word);
+ "wrong # args: no expression after \"%.*s\" argument",
+ numBytes, word);
Tcl_ResetResult(interp);
Tcl_AppendToObj(Tcl_GetObjResult(interp), buffer, -1);
code = TCL_ERROR;
@@ -1259,7 +1259,7 @@ TclCompileIfCmd(interp, parsePtr, envPtr)
tokenPtr = testTokenPtr + (testTokenPtr->numComponents + 1);
wordIdx++;
if (wordIdx >= numWords) {
- sprintf(buffer, "wrong # args: no script following \"%.20s\" argument", testTokenPtr->start);
+ sprintf(buffer, "wrong # args: no script following \"%.*s\" argument", testTokenPtr->size, testTokenPtr->start);
Tcl_ResetResult(interp);
Tcl_AppendToObj(Tcl_GetObjResult(interp), buffer, -1);
code = TCL_ERROR;