diff options
Diffstat (limited to 'runtime/string.c')
-rw-r--r-- | runtime/string.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/runtime/string.c b/runtime/string.c index 6615d741..b740c064 100644 --- a/runtime/string.c +++ b/runtime/string.c @@ -64,7 +64,7 @@ void _stp_sprintf (String str, const char *fmt, ...) va_start(args, fmt); num = _stp_vsnprintf(buf, size, fmt, args); va_end(args); - if (unlikely(num > size)) { + if (unlikely(num >= size)) { /* overflowed the buffer */ if (pb->len == 0) { /* A single print request exceeded the buffer size. */ |