summaryrefslogtreecommitdiff
path: root/coreutils
diff options
context:
space:
mode:
authorDenys Vlasenko2010-01-31 00:10:18 +0100
committerDenys Vlasenko2010-01-31 00:10:18 +0100
commited910c750d7908a31262488e04d38b7bf3d75322 (patch)
tree67b8e0385ab171988cf278acb17b516ef6c868b0 /coreutils
parente17764c8fb566f85020217dd8fd05fb6bc227e98 (diff)
downloadbusybox-ed910c750d7908a31262488e04d38b7bf3d75322.zip
busybox-ed910c750d7908a31262488e04d38b7bf3d75322.tar.gz
cal: add a unicode test
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'coreutils')
-rw-r--r--coreutils/cal.c5
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);
}