From ed910c750d7908a31262488e04d38b7bf3d75322 Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Sun, 31 Jan 2010 00:10:18 +0100 Subject: cal: add a unicode test Signed-off-by: Denys Vlasenko --- coreutils/cal.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'coreutils') diff --git a/coreutils/cal.c b/coreutils/cal.c index 207fa967b..79fe074f8 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); } -- cgit v1.2.3