commit a8cfbfd6b21a26ee790d6fd828f55ce0ce8ab924
parent 971acd2a0814080df22892afa1ca6cbed46e98d1
Author: Oshgnacknak <osh@oshgnacknak.de>
Date: Mon, 7 Mar 2022 14:16:56 +0100
Fix wrong number of new elements added
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/osh.h b/osh.h
@@ -363,7 +363,7 @@ namespace osh {
int required = 1 + snprintf(nullptr, 0, fmt, args...);
ensureCapacity(required);
snprintf(elements + size_, required, fmt, args...);
- size_ += required;
+ size_ += required - 1;
}
void print1(Formatter auto& fmt, const StringBuffer& s) {