diff options
author | dgp <dgp@users.sourceforge.net> | 2004-07-28 16:28:16 (GMT) |
---|---|---|
committer | dgp <dgp@users.sourceforge.net> | 2004-07-28 16:28:16 (GMT) |
commit | 4e5f121eb24abae229a568bf40a5ff0ccd542571 (patch) | |
tree | 90263c7d5bdfa6ef8d24ac4aad5388f53a00e849 /generic/tclBasic.c | |
parent | dd3a15f77204f9835c4d1e9aae10aa21b9e0d4ca (diff) | |
download | tcl-4e5f121eb24abae229a568bf40a5ff0ccd542571.zip tcl-4e5f121eb24abae229a568bf40a5ff0ccd542571.tar.gz tcl-4e5f121eb24abae229a568bf40a5ff0ccd542571.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/tclBasic.c')
-rw-r--r-- | generic/tclBasic.c | 8 |
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; } } |