Correctly handle keywords without options.

Reported by: swills@
MFC after:	14 days
This commit is contained in:
Greg Lehey 2012-11-17 23:49:20 +00:00
parent 7dc6ac7b74
commit 90f854b880

View file

@ -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) {