From 241aa1d40d31dcab9b7f108939f220fb56b2480d Mon Sep 17 00:00:00 2001 From: Peter Stephenson Date: Wed, 28 Jul 2004 10:34:31 +0000 Subject: 20214: fix debugging test with recursive functions --- ChangeLog | 3 +++ Src/parse.c | 5 ++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 76868a09a..9dd866c38 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2004-07-28 Peter Stephenson + * 20214: Src/parse.c: fix debugging test that didn't work + with recursive functions. + * 20204: Motoi Washida: Completion/Base/Utils/_retrieve_cache: typo in definition of _cache_dir. 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); -- cgit 1.4.1