mirror of
https://github.com/fastfetch-cli/fastfetch.git
synced 2026-10-30 17:41:41 +01:00
Found a better way to fix the warning from pevious commit
This commit is contained in:
+1
-1
@@ -101,7 +101,7 @@ static void setCapacity(FFstrbuf* strbuf, uint32_t capacity)
|
||||
|
||||
void ffStrbufEnsureCapacity(FFstrbuf* strbuf, uint32_t capacity)
|
||||
{
|
||||
if(strbuf->allocated > capacity)
|
||||
if(strbuf->allocated > capacity || capacity == 0)
|
||||
return;
|
||||
|
||||
setCapacity(strbuf, capacity + 1); // + 1 for the null byte
|
||||
|
||||
Reference in New Issue
Block a user