From 6453db457203825426b95fb46339b863c5358853 Mon Sep 17 00:00:00 2001 From: Karl Heuer Date: Tue, 9 Dec 1997 23:04:38 +0000 Subject: [PATCH] (GROW_FAIL_STACK): Fix previous change: update (fail_stack).size properly. --- src/regex.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/regex.c b/src/regex.c index 49ec073b892..6c79ba85035 100644 --- a/src/regex.c +++ b/src/regex.c @@ -1217,9 +1217,11 @@ typedef struct \ (fail_stack).stack == NULL \ ? 0 \ - : (MIN (re_max_failures * TYPICAL_FAILURE_SIZE, \ - ((fail_stack).size * sizeof (fail_stack_elt_t) \ - * FAIL_STACK_GROWTH_FACTOR)), \ + : ((fail_stack).size \ + = (MIN (re_max_failures * TYPICAL_FAILURE_SIZE, \ + ((fail_stack).size * sizeof (fail_stack_elt_t) \ + * FAIL_STACK_GROWTH_FACTOR)) \ + / sizeof (fail_stack_elt_t)), \ 1))) -- 2.39.2