# HG changeset patch # User Karl Heuer # Date 881824865 0 # Node ID aff2a2638ef4664e6d7bd5d6c58b2d11d387d0e4 # Parent 7ddf71a26f4bc07d41aa92261cddf51003c3e812 (GROW_FAIL_STACK): Fix test for stack size at max. diff -r 7ddf71a26f4b -r aff2a2638ef4 src/regex.c --- a/src/regex.c Thu Dec 11 07:07:42 1997 +0000 +++ b/src/regex.c Thu Dec 11 07:21:05 1997 +0000 @@ -1205,7 +1205,8 @@ #define FAIL_STACK_GROWTH_FACTOR 4 #define GROW_FAIL_STACK(fail_stack) \ - ((fail_stack).size >= re_max_failures * TYPICAL_FAILURE_SIZE \ + (((fail_stack).size * sizeof (fail_stack_elt_t) \ + >= re_max_failures * TYPICAL_FAILURE_SIZE) \ ? 0 \ : ((fail_stack).stack \ = (fail_stack_elt_t *) \