summaryrefslogtreecommitdiff
path: root/src/scanflags.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/scanflags.c')
-rw-r--r--src/scanflags.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/scanflags.c b/src/scanflags.c
index aa3de8a..9699a31 100644
--- a/src/scanflags.c
+++ b/src/scanflags.c
@@ -39,9 +39,10 @@ size_t _sf_top_ix=0, _sf_max=0;
void
sf_push (void)
{
- if (_sf_top_ix + 1 >= _sf_max)
+ if (_sf_top_ix + 1 >= _sf_max) {
_sf_max += 32;
_sf_stk = realloc(_sf_stk, sizeof(scanflags_t) * _sf_max);
+ }
// copy the top element
_sf_stk[_sf_top_ix + 1] = _sf_stk[_sf_top_ix];