From 7ffc978d0b74251201acd0aeb77d2b3cca0c2ee7 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Fr=C3=A9d=C3=A9ric=20Marchal?= Date: Wed, 25 Aug 2010 05:52:25 +0000 Subject: [PATCH] Report an error if the requested date range is invalid. Previous versions would silently ignore the date range and take whatever was in the log. --- CMakeLists.txt | 2 +- include/info.h | 2 +- util.c | 3 +++ 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 250193b..893c78e 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -3,7 +3,7 @@ PROJECT(sarg C) SET(sarg_VERSION 2) SET(sarg_REVISION "3.1-pre1") SET(sarg_BUILD "") -SET(sarg_BUILDDATE "Aug-17-2010") +SET(sarg_BUILDDATE "Aug-25-2010") INCLUDE(AddFileDependencies) INCLUDE(CheckIncludeFile) diff --git a/include/info.h b/include/info.h index 6413520..c76d936 100755 --- a/include/info.h +++ b/include/info.h @@ -1,3 +1,3 @@ -#define VERSION PACKAGE_VERSION" Aug-17-2010" +#define VERSION PACKAGE_VERSION" Aug-25-2010" #define PGM PACKAGE_NAME #define URL "http://sarg.sourceforge.net" diff --git a/util.c b/util.c index 6c6439c..de65878 100644 --- a/util.c +++ b/util.c @@ -1271,6 +1271,9 @@ void date_from(char *date, int *dfrom, int *duntil) y1=Date0->tm_year+1900; m1=Date0->tm_mon+1; d1=Date0->tm_mday; + } else { + debuga(_("Invalid date range passed on command line\n")); + exit(EXIT_FAILURE); } } -- 2.47.2