From 101a2bb871dfca3a0435b978f0a66506355d6d68 Mon Sep 17 00:00:00 2001 From: David Smith Date: Wed, 16 Dec 2009 12:05:55 -0600 Subject: [PATCH] PR 11097 fixed by correcting MAXNESTING test. * translate.cxx (emit_function): Fixed MAXNESTING test to not allow too deep recursion. --- translate.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/translate.cxx b/translate.cxx index e6c8cde9a..8c624a2fe 100644 --- a/translate.cxx +++ b/translate.cxx @@ -1501,7 +1501,7 @@ c_unparser::emit_function (functiondecl* v) // or 0...N (if we're called from another function). Incoming parameters are already // stored in c->locals[c->nesting+1]. See also ::emit_common_header() for more. - o->newline() << "if (unlikely (c->nesting+1 > MAXNESTING)) {"; + o->newline() << "if (unlikely (c->nesting+1 >= MAXNESTING)) {"; o->newline(1) << "c->last_error = \"MAXNESTING exceeded\";"; o->newline() << "return;"; o->newline(-1) << "} else {"; -- 2.43.5