summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2008-05-22 15:22:05 (GMT)
committerdgp <dgp@users.sourceforge.net>2008-05-22 15:22:05 (GMT)
commit0cc498df8a623e2490e79096ec68eb60a01a2c2b (patch)
tree92422349eae4670f1558c9853489b285623bf97e /generic
parentf2de8e1838fd8e298098915a1fc9292b01af59a5 (diff)
downloadtcl-0cc498df8a623e2490e79096ec68eb60a01a2c2b.zip
tcl-0cc498df8a623e2490e79096ec68eb60a01a2c2b.tar.gz
tcl-0cc498df8a623e2490e79096ec68eb60a01a2c2b.tar.bz2
* generic/tclNamesp.c (Tcl_LogCommandInfo): Restored ability to
handle the argument value length = -1. Thanks to Chris Darroch for discovering the bug and providing the fix. [Bug 1968245].
Diffstat (limited to 'generic')
-rw-r--r--generic/tclNamesp.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/generic/tclNamesp.c b/generic/tclNamesp.c
index 691c62f..cf39f90 100644
--- a/generic/tclNamesp.c
+++ b/generic/tclNamesp.c
@@ -23,7 +23,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclNamesp.c,v 1.163 2008/05/20 22:22:16 dkf Exp $
+ * RCS: @(#) $Id: tclNamesp.c,v 1.164 2008/05/22 15:22:07 dgp Exp $
*/
#include "tclInt.h"
@@ -6952,6 +6952,9 @@ Tcl_LogCommandInfo(
}
}
+ if (length < 0) {
+ length = strlen(command);
+ }
overflow = (length > limit);
Tcl_AppendObjToErrorInfo(interp, Tcl_ObjPrintf(
"\n %s\n\"%.*s%s\"", ((iPtr->errorInfo == NULL)