From bc6283404a2aa4a12a63fe0a002628ba742e9a1b Mon Sep 17 00:00:00 2001 From: dario Date: Wed, 29 Nov 2023 20:18:24 +0100 Subject: [PATCH] Increased the buffer size for formatting to correct size --- src/debug/printing/printable.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/debug/printing/printable.cpp b/src/debug/printing/printable.cpp index 5498c5b..a3206bb 100644 --- a/src/debug/printing/printable.cpp +++ b/src/debug/printing/printable.cpp @@ -20,8 +20,8 @@ namespace sta int n = vsnprintf(temp, 1, fmt, args); va_start (args, fmt); - char str[n]; - vsnprintf(str, n, fmt, args); + char str[n+1]; + vsnprintf(str, n+1, fmt, args); STA_ASSERT(n > 0); println(str);