From 82a84d38cb1620d869e0b54952b6a2f9f92acebc Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Mon, 20 Sep 2004 06:32:10 +0000 Subject: (main): Don't dump core if POSIXLY_CORRECT and given no arguments. --- src/echo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/echo.c') diff --git a/src/echo.c b/src/echo.c index 9467af345..1447fcaf8 100644 --- a/src/echo.c +++ b/src/echo.c @@ -120,7 +120,7 @@ main (int argc, char **argv) bool display_return = true; bool allow_options = (! getenv ("POSIXLY_CORRECT") - || (! DEFAULT_ECHO_TO_XPG && 0 < argc && STREQ (argv[1], "-n"))); + || (! DEFAULT_ECHO_TO_XPG && 1 < argc && STREQ (argv[1], "-n"))); /* System V machines already have a /bin/sh with a v9 behavior. Use the identical behavior for these machines so that the -- cgit v1.2.3-54-g00ecf