aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--common/str.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/common/str.cpp b/common/str.cpp
index c51c544556..834c4cd362 100644
--- a/common/str.cpp
+++ b/common/str.cpp
@@ -457,6 +457,9 @@ String String::printf(const char *fmt, ...) {
do {
size *= 2;
output.ensureCapacity(size-1, false);
+ assert(!output.isStorageIntern());
+ size = output._extern._capacity;
+
va_start(va, fmt);
len = vsnprintf(output._str, size, fmt, va);
va_end(va);