diff options
Diffstat (limited to 'coreutils')
-rw-r--r-- | coreutils/cal.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/coreutils/cal.c b/coreutils/cal.c index 207fa96..79fe074 100644 --- a/coreutils/cal.c +++ b/coreutils/cal.c @@ -113,7 +113,10 @@ int cal_main(int argc UNUSED_PARAM, char **argv) if (argv[2]) { bb_show_usage(); } - month = xatou_range(*argv++, 1, 12); + if (!(flags & 2)) { /* no -y */ + month = xatou_range(*argv, 1, 12); + } + argv++; } year = xatou_range(*argv, 1, 9999); } |