diff --git a/src/fastfetch.c b/src/fastfetch.c index 6c43171be..209d6f8bc 100644 --- a/src/fastfetch.c +++ b/src/fastfetch.c @@ -1445,7 +1445,7 @@ int main(int argc, const char** argv) //If we don't have a custom structure, use the default one if(data.structure.length == 0) - ffStrbufAppendS(&data.structure, FASTFETCH_DATATEXT_STRUCTURE); + ffStrbufSetS(&data.structure, FASTFETCH_DATATEXT_STRUCTURE); ffStart(&instance); diff --git a/src/util/FFstrbuf.c b/src/util/FFstrbuf.c index e6f705f52..94ea4af7e 100644 --- a/src/util/FFstrbuf.c +++ b/src/util/FFstrbuf.c @@ -43,7 +43,7 @@ void ffStrbufEnsureFree(FFstrbuf* strbuf, uint32_t free) uint32_t allocate = strbuf->allocated; if(allocate < 2) - allocate = FASTFETCH_STRBUF_DEFAULT_ALLOC; + allocate = 2; while((strbuf->length + free + 1) > allocate) // + 1 for the null byte allocate *= 2;