diff --git a/src/lib/support/StringBuilder.cpp b/src/lib/support/StringBuilder.cpp index 8143f95237d4c2..44c7a8004ffb82 100644 --- a/src/lib/support/StringBuilder.cpp +++ b/src/lib/support/StringBuilder.cpp @@ -28,6 +28,8 @@ StringBuilderBase & StringBuilderBase::AddFormat(const char * format, ...) if (mWriter.Available() > 0) { output = reinterpret_cast(mWriter.Buffer() + mWriter.Needed()); + } else { + output = reinterpret_cast(mWriter.Buffer() + mWriter.Size()); } // the + 1 size here because StringBuilder reserves one byte for final null terminator