commit 74a1fbed375bac92df1f3fea36127945f071aa84
Author:     Elie Le Vaillant <eolie...@disroot.org>
AuthorDate: Fri Dec 6 10:37:47 2024 +0100
Commit:     Roberto E. Vargas Caballero <k...@shike2.com>
CommitDate: Thu Dec 19 11:40:06 2024 +0100

    cron: fix '~' range parsing
    
    '~' after number was recognized as abnormal.

diff --git a/cron.c b/cron.c
index 2f3cedc..bd9f247 100644
--- a/cron.c
+++ b/cron.c
@@ -254,7 +254,7 @@ parserange(char *str, long low, long high, struct range *r)
 
                errno = 0;
                r->low = strtol(strlow, &e, 10);
-               if (*e || errno != 0)
+               if ((*e && *e != '~') || errno != 0)
                        return -1;
                if (strhigh) {
                        if (!*strhigh || range != NULL) /* i.e. N- or N-M-... */

Reply via email to