summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authorwelch <welch>1998-12-02 20:07:52 (GMT)
committerwelch <welch>1998-12-02 20:07:52 (GMT)
commit32a79b2ff96bfafd432e5aa9c1de68fdaa028544 (patch)
tree43c0af64380a54e6b8326d1712821de3ed40d8bf /generic
parent268b0e0536f8b73a091b695841708ebe48c4606b (diff)
downloadtcl-32a79b2ff96bfafd432e5aa9c1de68fdaa028544.zip
tcl-32a79b2ff96bfafd432e5aa9c1de68fdaa028544.tar.gz
tcl-32a79b2ff96bfafd432e5aa9c1de68fdaa028544.tar.bz2
8.0.4 merge
Diffstat (limited to 'generic')
-rw-r--r--generic/tclExecute.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/generic/tclExecute.c b/generic/tclExecute.c
index 32dcfa2..2f3cc56 100644
--- a/generic/tclExecute.c
+++ b/generic/tclExecute.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: tclExecute.c,v 1.1.2.4 1998/11/11 04:54:13 stanton Exp $
+ * RCS: @(#) $Id: tclExecute.c,v 1.1.2.5 1998/12/02 20:08:04 welch Exp $
*/
#include "tclInt.h"
@@ -3300,12 +3300,17 @@ GetExceptRangeForPc(pc, catchOnly, codePtr)
ByteCode* codePtr; /* Points to the ByteCode in which to search
* for the enclosing ExceptionRange. */
{
- ExceptionRange *rangeArrayPtr = codePtr->exceptArrayPtr;
+ ExceptionRange *rangeArrayPtr;
int numRanges = codePtr->numExceptRanges;
register ExceptionRange *rangePtr;
int pcOffset = (pc - codePtr->codeStart);
register int i, level;
+ if (numRanges == 0) {
+ return NULL;
+ }
+ rangeArrayPtr = codePtr->exceptArrayPtr;
+
for (level = codePtr->maxExceptDepth; level >= 0; level--) {
for (i = 0; i < numRanges; i++) {
rangePtr = &(rangeArrayPtr[i]);