Module Name:    src
Committed By:   christos
Date:           Sat Apr 23 13:02:04 UTC 2022

Modified Files:
        src/lib/libutil: parsedate.y

Log Message:
fix date -d 12/01/2022, found by Anon Ymous


To generate a diff of this commit:
cvs rdiff -u -r1.36 -r1.37 src/lib/libutil/parsedate.y

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/lib/libutil/parsedate.y
diff -u src/lib/libutil/parsedate.y:1.36 src/lib/libutil/parsedate.y:1.37
--- src/lib/libutil/parsedate.y:1.36	Fri Oct 30 18:03:11 2020
+++ src/lib/libutil/parsedate.y	Sat Apr 23 09:02:04 2022
@@ -14,7 +14,7 @@
 
 #include <sys/cdefs.h>
 #ifdef __RCSID
-__RCSID("$NetBSD: parsedate.y,v 1.36 2020/10/30 22:03:11 kre Exp $");
+__RCSID("$NetBSD: parsedate.y,v 1.37 2022/04/23 13:02:04 christos Exp $");
 #endif
 
 #include <stdio.h>
@@ -359,7 +359,7 @@ date:
 			param->yyMonth = $3;
 			param->yyDay = $5;
 		} else {
-			if ($1 >= 12 || $3 > 31 || $1 == 0 || $3 == 0)
+			if ($1 > 12 || $3 > 31 || $1 == 0 || $3 == 0)
 				YYREJECT;
 			param->yyMonth = $1;
 			param->yyDay = $3;

Reply via email to