mirror of
https://github.com/fastfetch-cli/fastfetch.git
synced 2026-09-13 02:42:09 +02:00
FFstrbuf: fix small FFstrbuf allocations in ffStrbufEnsureFree (#1383)
This commit is contained in:
+1
-1
@@ -33,7 +33,7 @@ void ffStrbufEnsureFree(FFstrbuf* strbuf, uint32_t free)
|
||||
return;
|
||||
|
||||
uint32_t allocate = strbuf->allocated;
|
||||
if(allocate < 2)
|
||||
if(allocate < FASTFETCH_STRBUF_DEFAULT_ALLOC)
|
||||
allocate = FASTFETCH_STRBUF_DEFAULT_ALLOC;
|
||||
|
||||
while((strbuf->length + free + 1) > allocate) // + 1 for the null byte
|
||||
|
||||
Reference in New Issue
Block a user