From 854465a9cf1e171e8f7c94ddf809e56facf4c63e Mon Sep 17 00:00:00 2001 From: Robin Watts Date: Wed, 12 Dec 2012 18:58:04 +0000 Subject: Fix fz_try/fz_catch in overflow case. Thanks to zeniko for pointing out that the recent changes to the fz_try/fz_catch macros to allow for throws in the fz_always block had broken the exception stack overflow case. Thanks also for the example file (nesting stack overflow.pdf), which has now been added to the regression suite. --- fitz/base_error.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'fitz') diff --git a/fitz/base_error.c b/fitz/base_error.c index 869bf95e..0167611a 100644 --- a/fitz/base_error.c +++ b/fitz/base_error.c @@ -96,7 +96,7 @@ int fz_push_try(fz_error_context *ex) * direct to the always/catch clauses. */ assert(ex->top == nelem(ex->stack)-1); strcpy(ex->message, "exception stack overflow!\n"); - ex->stack[ex->top].code = 1; + ex->stack[ex->top].code = 2; return 0; } -- cgit v1.2.3