summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--misc-utils/cal.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/misc-utils/cal.c b/misc-utils/cal.c
index a8534b8c..3e38f8ed 100644
--- a/misc-utils/cal.c
+++ b/misc-utils/cal.c
@@ -354,7 +354,7 @@ main(int argc, char **argv) {
day = month = year = 0;
switch(argc) {
case 3:
- if ((day = atoi(*argv++)) < 1 || month > 31)
+ if ((day = atoi(*argv++)) < 1 || day > 31)
errx(1, _("illegal day value: use 1-%d"), 31);
/* FALLTHROUGH */
case 2: