summaryrefslogtreecommitdiffstats
path: root/generic/tclExecute.c
diff options
context:
space:
mode:
authorstanton <stanton>1998-11-19 20:10:50 (GMT)
committerstanton <stanton>1998-11-19 20:10:50 (GMT)
commit2ca2b6fdac8c01b6b4157b9840d47781024e21f0 (patch)
treeedc6a634767a5b0f0318441e097de4ec73ec1ebc /generic/tclExecute.c
parent5ba038ae32228917a48baf9ccf1ab2ebee59ea31 (diff)
downloadtcl-2ca2b6fdac8c01b6b4157b9840d47781024e21f0.zip
tcl-2ca2b6fdac8c01b6b4157b9840d47781024e21f0.tar.gz
tcl-2ca2b6fdac8c01b6b4157b9840d47781024e21f0.tar.bz2
eliminated purify warning and other lint
Diffstat (limited to 'generic/tclExecute.c')
-rw-r--r--generic/tclExecute.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/generic/tclExecute.c b/generic/tclExecute.c
index dd174c6..b899085 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.4 1998/09/14 18:39:58 stanton Exp $
+ * RCS: @(#) $Id: tclExecute.c,v 1.5 1998/11/19 20:10:51 stanton Exp $
*/
#include "tclInt.h"
@@ -3450,12 +3450,17 @@ TclGetExceptionRangeForPc(pc, catchOnly, codePtr)
ByteCode* codePtr; /* Points to the ByteCode in which to search
* for the enclosing ExceptionRange. */
{
- ExceptionRange *rangeArrayPtr = codePtr->excRangeArrayPtr;
+ ExceptionRange *rangeArrayPtr;
int numRanges = codePtr->numExcRanges;
register ExceptionRange *rangePtr;
int codeOffset = (pc - codePtr->codeStart);
register int i, level;
+ if (numRanges == 0) {
+ return NULL;
+ }
+ rangeArrayPtr = codePtr->excRangeArrayPtr;
+
for (level = codePtr->maxExcRangeDepth; level >= 0; level--) {
for (i = 0; i < numRanges; i++) {
rangePtr = &(rangeArrayPtr[i]);