summaryrefslogtreecommitdiffstats
path: root/generic/tclCompExpr.c
diff options
context:
space:
mode:
authorandreas_kupries <akupries@shaw.ca>2008-04-17 19:14:17 (GMT)
committerandreas_kupries <akupries@shaw.ca>2008-04-17 19:14:17 (GMT)
commit09608e5bce1452abb2255e1f859f076afea463b9 (patch)
treea12e5be99c025aa9ba9b569eac8b524673bf46e5 /generic/tclCompExpr.c
parent29538c18237e7c58eb01d59da1c2d884ce682324 (diff)
downloadtcl-09608e5bce1452abb2255e1f859f076afea463b9.zip
tcl-09608e5bce1452abb2255e1f859f076afea463b9.tar.gz
tcl-09608e5bce1452abb2255e1f859f076afea463b9.tar.bz2
* generic/tclCompExpr.c (CompileMathFuncCall): Added
* tests/compile.test (compile-16.0): Tcl_ResetResult before appending error message, to clear out possible sharing. Added test case demonstrating the crash (abort on shared object) without the fix.
Diffstat (limited to 'generic/tclCompExpr.c')
-rw-r--r--generic/tclCompExpr.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/generic/tclCompExpr.c b/generic/tclCompExpr.c
index 3ff749b..8c66f5c 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.13.2.3 2006/11/28 22:20:00 andreas_kupries Exp $
+ * RCS: @(#) $Id: tclCompExpr.c,v 1.13.2.4 2008/04/17 19:14:20 andreas_kupries Exp $
*/
#include "tclInt.h"
@@ -852,6 +852,7 @@ CompileMathFuncCall(exprTokenPtr, funcName, infoPtr, envPtr, endPtrPtr)
code = TCL_OK;
hPtr = Tcl_FindHashEntry(&iPtr->mathFuncTable, funcName);
if (hPtr == NULL) {
+ Tcl_ResetResult(interp);
Tcl_AppendStringsToObj(Tcl_GetObjResult(interp),
"unknown math function \"", funcName, "\"", (char *) NULL);
code = TCL_ERROR;