From 08c818fd80146b3da093059422ce0d8ff870ba9a Mon Sep 17 00:00:00 2001 From: Carlos H Date: Mon, 7 May 2012 21:58:26 +0200 Subject: [PATCH] Read a long with atol, as it should be. --- cronlist.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cronlist.c b/cronlist.c index d73019b..48b7851 100644 --- a/cronlist.c +++ b/cronlist.c @@ -487,7 +487,7 @@ void get_tm_from_date (char *datespec, struct tm *dest) { fgets(number, 20, p); pclose(p); if (!isdigit(number[0])) die("command ā€˜%sā€™ didn't return a meaningful value", cmd); - n = atoi(number); + n = atol(number); stm = localtime(&n); if (!stm) die("date ā€˜%sā€™ not supported", datespec); *dest = *stm; -- 2.11.4.GIT