summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2004-07-28 16:28:16 (GMT)
committerdgp <dgp@users.sourceforge.net>2004-07-28 16:28:16 (GMT)
commit21bc00afa918d643b59dc2ae9b8eb5cd95c85507 (patch)
tree90263c7d5bdfa6ef8d24ac4aad5388f53a00e849 /generic
parent80193031a7573a45bfdefaad1e7715906db9f6d1 (diff)
downloadtcl-21bc00afa918d643b59dc2ae9b8eb5cd95c85507.zip
tcl-21bc00afa918d643b59dc2ae9b8eb5cd95c85507.tar.gz
tcl-21bc00afa918d643b59dc2ae9b8eb5cd95c85507.tar.bz2
* generic/tclMain.c (Tcl_Main, StdinProc): Append newline only
* tests/basic.test (basic-46.1): to incomplete scripts as part of multi-line script construction. Do not add an extra trailing newline to the complete script. [Bug 833150]
Diffstat (limited to 'generic')
-rw-r--r--generic/tclBasic.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/generic/tclBasic.c b/generic/tclBasic.c
index 0a32cbf..f7116dd 100644
--- a/generic/tclBasic.c
+++ b/generic/tclBasic.c
@@ -13,7 +13,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclBasic.c,v 1.75.2.8 2003/10/08 23:18:17 dgp Exp $
+ * RCS: @(#) $Id: tclBasic.c,v 1.75.2.9 2004/07/28 16:28:20 dgp Exp $
*/
#include "tclInt.h"
@@ -4027,12 +4027,14 @@ Tcl_EvalObjEx(interp, objPtr, flags)
/*
* If an error was created here, record information about
- * what was being executed when the error occurred.
+ * what was being executed when the error occurred. Remove
+ * the extra \n added by tclMain.c in the command sent to
+ * Tcl_LogCommandInfo [Bug 833150].
*/
if (!(iPtr->flags & ERR_ALREADY_LOGGED)) {
script = Tcl_GetStringFromObj(objPtr, &numSrcBytes);
- Tcl_LogCommandInfo(interp, script, script, numSrcBytes);
+ Tcl_LogCommandInfo(interp, script, script, --numSrcBytes);
iPtr->flags &= ~ERR_ALREADY_LOGGED;
}
}