From: Bernhard Reutner-Fischer Date: Fri, 8 Jun 2007 12:52:17 +0000 (-0000) Subject: - fix invocation without any argument X-Git-Tag: 1_7_0~267 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=def8260219797b0f9f734915f4918f34e85e7049;p=oweals%2Fbusybox.git - fix invocation without any argument --- diff --git a/coreutils/echo.c b/coreutils/echo.c index 1016d3876..11507b438 100644 --- a/coreutils/echo.c +++ b/coreutils/echo.c @@ -34,6 +34,8 @@ int bb_echo(char **argv) nflag = 1, /* 1 -- print '\n' */ }; arg = ++argv; + if (!arg) + goto newline_ret; #else const char *p; char nflag = 1; @@ -107,9 +109,7 @@ int bb_echo(char **argv) putchar(' '); } -#if ENABLE_FEATURE_FANCY_ECHO newline_ret: -#endif if (nflag) { putchar('\n'); }