about summary refs log tree commit diff
path: root/Src/parse.c
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2004-07-28 10:34:31 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2004-07-28 10:34:31 +0000
commit241aa1d40d31dcab9b7f108939f220fb56b2480d (patch)
tree3c6da4072cea763e52fcb00afd463af1a1e487de /Src/parse.c
parente31d0b939d390923077fb309b46212da5c692e44 (diff)
downloadzsh-241aa1d40d31dcab9b7f108939f220fb56b2480d.tar.gz
zsh-241aa1d40d31dcab9b7f108939f220fb56b2480d.tar.xz
zsh-241aa1d40d31dcab9b7f108939f220fb56b2480d.zip
20214: fix debugging test with recursive functions
Diffstat (limited to 'Src/parse.c')
-rw-r--r--Src/parse.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/Src/parse.c b/Src/parse.c
index 0d0dc6c35..551573f5a 100644
--- a/Src/parse.c
+++ b/Src/parse.c
@@ -2168,7 +2168,10 @@ freeeprog(Eprog p)
 	/* paranoia */
 	DPUTS(p->nref > 0 && (p->flags & EF_HEAP), "Heap EPROG has nref > 0");
 	DPUTS(p->nref < 0 && !(p->flags & EF_HEAP), "Real EPROG has nref < 0");
-	DPUTS(p->nref < -1 || p->nref > 256, "Uninitialised EPROG nref");
+	DPUTS(p->nref < -1, "Uninitialised EPROG nref");
+#ifdef MAX_FUNCTION_DEPTH
+	DPUTS(p->nref > MAX_FUNCTION_DEPTH + 10, "Overlarge EPROG nref");
+#endif
 	if (p->nref > 0 && !--p->nref) {
 	    for (i = p->npats, pp = p->pats; i--; pp++)
 		freepatprog(*pp);