aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLukas Fleischer <calcurse@cryptocrack.de>2014-08-09 15:43:08 +0200
committerLukas Fleischer <calcurse@cryptocrack.de>2014-08-09 15:43:08 +0200
commitaca92e619db9bfa517877761285f37de11a50755 (patch)
treee19de02b64ff838f91aa367aff44cb750b1943d7
parent519107dc47a97cd6ae39eef7ba5fbceef59da3ed (diff)
downloadcalcurse-aca92e619db9bfa517877761285f37de11a50755.tar.gz
calcurse-aca92e619db9bfa517877761285f37de11a50755.zip
Fix parsing of times in parse_datetimearg()
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
-rw-r--r--src/args.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/args.c b/src/args.c
index 810f787..2d5bea4 100644
--- a/src/args.c
+++ b/src/args.c
@@ -353,9 +353,9 @@ static int parse_datetimearg(const char *str)
}
ret = parse_datearg(date);
- if (!ret) {
+ if (ret < 0) {
/* No date specified, use time only. */
- if (!parse_time(time, &hour, &min))
+ if (!parse_time(date, &hour, &min))
return -1;
return get_today() + hour * HOURINSEC + min * MININSEC;
}