summaryrefslogtreecommitdiffstats
path: root/generic/tclExecute.c
diff options
context:
space:
mode:
authorferrieux <ferrieux@users.sourceforge.net>2010-06-07 21:24:59 (GMT)
committerferrieux <ferrieux@users.sourceforge.net>2010-06-07 21:24:59 (GMT)
commit33b3f713338afde574fa54a15ce8e33f8d628c7c (patch)
tree1c82b7af3007e0a61883152fb26e23b2efdf5198 /generic/tclExecute.c
parent84f4fa52310247fb505be4eed77e19e48be226a0 (diff)
downloadtcl-33b3f713338afde574fa54a15ce8e33f8d628c7c.zip
tcl-33b3f713338afde574fa54a15ce8e33f8d628c7c.tar.gz
tcl-33b3f713338afde574fa54a15ce8e33f8d628c7c.tar.bz2
Ensure proper reset of [info errorstack] even when compiling constant expr's with errors.
Diffstat (limited to 'generic/tclExecute.c')
-rw-r--r--generic/tclExecute.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/generic/tclExecute.c b/generic/tclExecute.c
index 934a9fb..a738065 100644
--- a/generic/tclExecute.c
+++ b/generic/tclExecute.c
@@ -14,7 +14,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclExecute.c,v 1.485 2010/06/05 16:24:26 msofer Exp $
+ * RCS: @(#) $Id: tclExecute.c,v 1.486 2010/06/07 21:24:59 ferrieux Exp $
*/
#include "tclInt.h"
@@ -6419,11 +6419,9 @@ TclExecuteByteCode(
}
if ((TRESULT == TCL_ERROR) && !(iPtr->flags & ERR_ALREADY_LOGGED)) {
bytes = GetSrcInfoForPc(pc, codePtr, &length);
- if (bytes != NULL) {
- DECACHE_STACK_INFO();
- Tcl_LogCommandInfo(interp, codePtr->source, bytes, length);
- CACHE_STACK_INFO();
- }
+ DECACHE_STACK_INFO();
+ Tcl_LogCommandInfo(interp, codePtr->source, bytes, bytes ? length : 0);
+ CACHE_STACK_INFO();
}
iPtr->flags &= ~ERR_ALREADY_LOGGED;