summaryrefslogtreecommitdiffstats
path: root/runtime/string.c
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/string.c')
-rw-r--r--runtime/string.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/runtime/string.c b/runtime/string.c
index ef715b40..b4c14d01 100644
--- a/runtime/string.c
+++ b/runtime/string.c
@@ -62,6 +62,7 @@ void _stp_sprintf (String str, const char *fmt, ...)
_stp_pbuf_len[cpu] = STP_PRINT_BUF_LEN;
_stp_print_flush();
} else {
+ *buf ='\0';
_stp_print_flush();
va_start(args, fmt);
_stp_vsprintf(_stp_stdout, fmt, args);