summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog7
-rw-r--r--generic/tclBasic.c8
-rw-r--r--tests/basic.test5
3 files changed, 14 insertions, 6 deletions
diff --git a/ChangeLog b/ChangeLog
index 87a1f79..3d460a5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2004-07-28 Don Porter <dgp@users.sourceforge.net>
+
+ * 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]
+
2004-07-26 Jeff Hobbs <jeffh@ActiveState.com>
*** 8.4.7 TAGGED FOR RELEASE ***
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;
}
}
diff --git a/tests/basic.test b/tests/basic.test
index cc35cbe..39c9f67 100644
--- a/tests/basic.test
+++ b/tests/basic.test
@@ -15,7 +15,7 @@
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
-# RCS: @(#) $Id: basic.test,v 1.25.2.3 2004/03/01 17:33:22 dgp Exp $
+# RCS: @(#) $Id: basic.test,v 1.25.2.4 2004/07/28 16:28:21 dgp Exp $
#
package require tcltest 2
@@ -584,8 +584,7 @@ test basic-46.1 {Tcl_AllowExceptions: exception return not allowed} {stdio} {
list $res $msg
} {1 {invoked "continue" outside of a loop
while executing
-"continue
-"
+"continue"
DONE
}}