From 1b99ff44f9b6286dc5a2fecd8279c2e57404f670 Mon Sep 17 00:00:00 2001 From: Leah Neukirchen Date: Tue, 29 Aug 2017 17:48:32 +0200 Subject: fix weekofyear parsing -W0 is still allowed, but never matches... --- snooze.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/snooze.c b/snooze.c index 9a3381a..dfec5c8 100644 --- a/snooze.c +++ b/snooze.c @@ -241,7 +241,7 @@ int main(int argc, char *argv[]) while ((c = getopt(argc, argv, "+D:W:H:M:S:T:R:d:m:ns:t:vw:")) != -1) switch(c) { case 'D': parse(optarg, dayofyear, sizeof dayofyear, -1); break; - case 'W': parse(optarg, weekofyear, sizeof weekofyear, -1); break; + case 'W': parse(optarg, weekofyear, sizeof weekofyear, 0); break; case 'H': parse(optarg, hour, sizeof hour, 0); break; case 'M': parse(optarg, minute, sizeof minute, 0); break; case 'S': parse(optarg, second, sizeof second, 0); break; -- cgit v1.2.3