Skip to content

Commit 31a2963

Browse files
committed
FFstrbuf: fix small FFstrbuf allocations in ffStrbufEnsureFree
1 parent 837903e commit 31a2963

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/util/FFstrbuf.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ void ffStrbufEnsureFree(FFstrbuf* strbuf, uint32_t free)
3333
return;
3434

3535
uint32_t allocate = strbuf->allocated;
36-
if(allocate < 2)
36+
if(allocate < FASTFETCH_STRBUF_DEFAULT_ALLOC)
3737
allocate = FASTFETCH_STRBUF_DEFAULT_ALLOC;
3838

3939
while((strbuf->length + free + 1) > allocate) // + 1 for the null byte

0 commit comments

Comments
 (0)