summaryrefslogtreecommitdiff
path: root/util.c
diff options
context:
space:
mode:
Diffstat (limited to 'util.c')
-rw-r--r--util.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/util.c b/util.c
index 6008ffc..8808aba 100644
--- a/util.c
+++ b/util.c
@@ -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;
}