From 2e5b9af6e5318760efe3d402edbbaa06ddd53d2b Mon Sep 17 00:00:00 2001 From: grog Date: Sat, 17 Nov 2012 23:49:20 +0000 Subject: Correctly handle keywords without options. Reported by: swills@ MFC after: 14 days --- usr.bin/locale/locale.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'usr.bin/locale') diff --git a/usr.bin/locale/locale.c b/usr.bin/locale/locale.c index 85e6d7f..ee9bf84 100644 --- a/usr.bin/locale/locale.c +++ b/usr.bin/locale/locale.c @@ -279,8 +279,8 @@ main(int argc, char *argv[]) exit(0); } - /* process '-c' and/or '-k' */ - if (prt_categories || prt_keywords) { + /* process '-c', '-k', or command line arguments. */ + if (prt_categories || prt_keywords || argc > 0) { if (argc > 0) { setlocale(LC_ALL, ""); while (argc > 0) { -- cgit v1.1