diff options
Diffstat (limited to 'util.c')
-rw-r--r-- | util.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -16,8 +16,9 @@ bprintf(const char *fmt, ...) len = vsnprintf(buf, sizeof(buf) - 1, fmt, ap); va_end(ap); - if (len >= sizeof(buf)) + if (len >= sizeof(buf)) { buf[sizeof(buf)-1] = '\0'; + } return buf; } |