Attachment "833150.patch" to
ticket [833150ffff]
added by
msofer
2004-03-27 09:58:14.
Index: generic/tclBasic.c
===================================================================
RCS file: /cvsroot/tcl/tcl/generic/tclBasic.c,v
retrieving revision 1.98
diff -u -r1.98 tclBasic.c
--- generic/tclBasic.c 17 Mar 2004 18:14:13 -0000 1.98
+++ generic/tclBasic.c 27 Mar 2004 02:34:33 -0000
@@ -3888,12 +3888,14 @@
/*
* 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;
}
}
Index: tests/basic.test
===================================================================
RCS file: /cvsroot/tcl/tcl/tests/basic.test,v
retrieving revision 1.31
diff -u -r1.31 basic.test
--- tests/basic.test 25 Feb 2004 23:56:59 -0000 1.31
+++ tests/basic.test 27 Mar 2004 02:34:34 -0000
@@ -521,8 +521,7 @@
list $res $msg
} {1 {invoked "continue" outside of a loop
while executing
-"continue
-"
+"continue"
DONE
}}