summaryrefslogtreecommitdiffstats
path: root/usage.c
diff options
context:
space:
mode:
Diffstat (limited to 'usage.c')
-rw-r--r--usage.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/usage.c b/usage.c
index 09f0ed5..7a2f780 100644
--- a/usage.c
+++ b/usage.c
@@ -19,8 +19,11 @@ static void vreportf(const char *prefix, const char *err, va_list params)
}
memcpy(msg, prefix, prefix_len);
p = msg + prefix_len;
- if (vsnprintf(p, pend - p, err, params) < 0)
+ if (vsnprintf(p, pend - p, err, params) < 0) {
+ fprintf(stderr, _("error: unable to format message: %s\n"),
+ err);
*p = '\0'; /* vsnprintf() failed, clip at prefix */
+ }
for (; p != pend - 1 && *p; p++) {
if (iscntrl(*p) && *p != '\t' && *p != '\n')