diff options
Diffstat (limited to 'libbb/verror_msg.c')
-rw-r--r-- | libbb/verror_msg.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/libbb/verror_msg.c b/libbb/verror_msg.c index e51003134..dbd8323e4 100644 --- a/libbb/verror_msg.c +++ b/libbb/verror_msg.c @@ -45,8 +45,10 @@ void bb_verror_msg(const char *s, va_list p, const char* strerr) msg[applet_len - 2] = ':'; msg[applet_len - 1] = ' '; if (strerr) { - msg[used++] = ':'; - msg[used++] = ' '; + if (s[0]) { /* not perror_nomsg? */ + msg[used++] = ':'; + msg[used++] = ' '; + } strcpy(&msg[used], strerr); used += strerr_len; } |