diff options
-rw-r--r-- | shell/ash.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/shell/ash.c b/shell/ash.c index db7dffc72..a006a1c26 100644 --- a/shell/ash.c +++ b/shell/ash.c @@ -713,7 +713,7 @@ fmtstr(char *outbuf, size_t length, const char *fmt, ...) ret = vsnprintf(outbuf, length, fmt, ap); va_end(ap); INT_ON; - return ret; + return ret > (int)length ? length : ret; } static void |