Blame SOURCES/0004-Fix-regression-in-handling-x-crontab-entries.patch

11487f
From 991a5f2a44c68f576b6c6da3a7ac8fbc8f97a3b0 Mon Sep 17 00:00:00 2001
11487f
From: Tomas Mraz <tmraz@fedoraproject.org>
11487f
Date: Tue, 22 Mar 2022 14:35:48 +0100
11487f
Subject: [PATCH 4/5] Fix regression in handling */x crontab entries
11487f
11487f
Fixes #102
11487f
---
11487f
 src/entry.c | 4 +++-
11487f
 1 file changed, 3 insertions(+), 1 deletion(-)
11487f
11487f
diff --git a/src/entry.c b/src/entry.c
11487f
index 15ce9b5..e9e258b 100644
11487f
--- a/src/entry.c
11487f
+++ b/src/entry.c
11487f
@@ -563,7 +563,9 @@ get_range(bitstr_t * bits, int low, int high, const char *names[],
11487f
 				return (EOF);
11487f
 
11487f
 			case R_STEP:
11487f
-				if (get_number(&num3, 0, PPC_NULL, file) != EOF) {
11487f
+				unget_char(ch, file);
11487f
+				if (get_number(&num3, 0, PPC_NULL, file) != EOF
11487f
+				    && num3 != 0) {
11487f
 					state = R_TERMS;
11487f
 					break;
11487f
 				}
11487f
-- 
11487f
2.36.1
11487f