summaryrefslogtreecommitdiff
path: root/src/config.c
diff options
context:
space:
mode:
authorBaptiste Jonglez <baptiste--git@jonglez.org>2012-05-28 04:50:39 +0200
committerLukas Fleischer <calcurse@cryptocrack.de>2012-05-31 20:42:15 +0200
commit9e1185f526e4a6636a64b026c6617898a6a1c8aa (patch)
treeed64a6606bf4c619b0e75bd381ce15f0566d58f7 /src/config.c
parent7eb3abb08a0b20bef49a9bf717ea30fad27c5606 (diff)
downloadcalcurse-9e1185f526e4a6636a64b026c6617898a6a1c8aa.zip
Give a meaning to DATE_FORMATS
It's a bit weird to consider DATE_FORMATS as part of the date input format enum, all the more so as it does not even represent the number of available formats (since those are numbered from 1). Turn DATE_FORMATS into the number of available date input formats. Signed-off-by: Baptiste Jonglez <baptiste--git@jonglez.org> Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
Diffstat (limited to 'src/config.c')
-rw-r--r--src/config.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/config.c b/src/config.c
index bb6ddf7..17ac848 100644
--- a/src/config.c
+++ b/src/config.c
@@ -243,7 +243,7 @@ static int config_parse_output_datefmt(void *dummy, const char *val)
static int config_parse_input_datefmt(void *dummy, const char *val)
{
if (config_parse_int(&conf.input_datefmt, val)) {
- if (conf.input_datefmt <= 0 || conf.input_datefmt >= DATE_FORMATS)
+ if (conf.input_datefmt <= 0 || conf.input_datefmt > DATE_FORMATS)
conf.input_datefmt = 1;
return 1;
} else