mirror of
https://github.com/fastfetch-cli/fastfetch.git
synced 2026-09-13 10:52:08 +02:00
src: end va_list before returning (#618)
Explicitly end the `va_list` before returning in the `ffStrbufSetF()` function as `va_list`s are not ended implicitly.
This commit is contained in:
committed by
GitHub
parent
ac654ff346
commit
b4cd47cbc4
+5
-2
@@ -167,8 +167,11 @@ void ffStrbufSetF(FFstrbuf* strbuf, const char* format, ...)
|
||||
va_list arguments;
|
||||
va_start(arguments, format);
|
||||
|
||||
if(strbuf->allocated == 0)
|
||||
return ffStrbufInitVF(strbuf, format, arguments);
|
||||
if(strbuf->allocated == 0) {
|
||||
ffStrbufInitVF(strbuf, format, arguments);
|
||||
va_end(arguments);
|
||||
return;
|
||||
}
|
||||
|
||||
ffStrbufClear(strbuf);
|
||||
ffStrbufAppendVF(strbuf, format, arguments);
|
||||
|
||||
Reference in New Issue
Block a user