diff options
author | Andreas Kling <awesomekling@gmail.com> | 2019-04-15 23:56:35 +0200 |
---|---|---|
committer | Andreas Kling <awesomekling@gmail.com> | 2019-04-15 23:56:35 +0200 |
commit | 30b0e5f82ee72ee78b202506b4e12f7992af270d (patch) | |
tree | 27dcd65529199f21b309e910b20a7c422f0adf0a | |
parent | fa89446cb6a5276925ec4cbf41b0f0d967304009 (diff) | |
download | serenity-30b0e5f82ee72ee78b202506b4e12f7992af270d.zip |
AK: Make StringBuilder::appendf() pre-allocate the format string length.
-rw-r--r-- | AK/StringBuilder.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/AK/StringBuilder.cpp b/AK/StringBuilder.cpp index 8eb7479aea..08776dd3f3 100644 --- a/AK/StringBuilder.cpp +++ b/AK/StringBuilder.cpp @@ -52,6 +52,7 @@ void StringBuilder::appendf(const char* fmt, ...) { va_list ap; va_start(ap, fmt); + will_append(strlen(fmt)); appendvf(fmt, ap); va_end(ap); } |