summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authorjenglish <jenglish@flightlab.com>2002-06-21 21:17:39 (GMT)
committerjenglish <jenglish@flightlab.com>2002-06-21 21:17:39 (GMT)
commit61158455202c06406d3c69e6d69acb490856f7ac (patch)
treed8313af4788089198ad303a238fb21e114d78d18 /generic
parentd4eb3712e574a36917bc1a5cc3173af9fec10f8a (diff)
downloadtcl-61158455202c06406d3c69e6d69acb490856f7ac.zip
tcl-61158455202c06406d3c69e6d69acb490856f7ac.tar.gz
tcl-61158455202c06406d3c69e6d69acb490856f7ac.tar.bz2
LogSyntaxError() should reset the interpreter result
[Bug 550142 "Tcl_ExprObj -> abort"]
Diffstat (limited to 'generic')
-rw-r--r--generic/tclCompExpr.c3
-rw-r--r--generic/tclParseExpr.c3
2 files changed, 4 insertions, 2 deletions
diff --git a/generic/tclCompExpr.c b/generic/tclCompExpr.c
index b21477a..5e8567f 100644
--- a/generic/tclCompExpr.c
+++ b/generic/tclCompExpr.c
@@ -9,7 +9,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclCompExpr.c,v 1.9 2002/05/30 15:03:56 msofer Exp $
+ * RCS: @(#) $Id: tclCompExpr.c,v 1.10 2002/06/21 21:17:39 jenglish Exp $
*/
#include "tclInt.h"
@@ -968,6 +968,7 @@ LogSyntaxError(infoPtr)
sprintf(buffer, "syntax error in expression \"%.*s\"",
((numBytes > 60)? 60 : numBytes), infoPtr->expr);
+ Tcl_ResetResult(infoPtr->interp);
Tcl_AppendStringsToObj(Tcl_GetObjResult(infoPtr->interp),
buffer, (char *) NULL);
}
diff --git a/generic/tclParseExpr.c b/generic/tclParseExpr.c
index f7d0428..6d1fc30 100644
--- a/generic/tclParseExpr.c
+++ b/generic/tclParseExpr.c
@@ -12,7 +12,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclParseExpr.c,v 1.12 2002/02/15 14:28:49 dkf Exp $
+ * RCS: @(#) $Id: tclParseExpr.c,v 1.13 2002/06/21 21:17:39 jenglish Exp $
*/
#include "tclInt.h"
@@ -1996,6 +1996,7 @@ LogSyntaxError(infoPtr, extraInfo)
sprintf(buffer, "syntax error in expression \"%s\"",
infoPtr->originalExpr);
}
+ Tcl_ResetResult(infoPtr->parsePtr->interp);
Tcl_AppendStringsToObj(Tcl_GetObjResult(infoPtr->parsePtr->interp),
buffer, ": ", extraInfo, (char *) NULL);
infoPtr->parsePtr->errorType = TCL_PARSE_SYNTAX;