From aca92e619db9bfa517877761285f37de11a50755 Mon Sep 17 00:00:00 2001
From: Lukas Fleischer <calcurse@cryptocrack.de>
Date: Sat, 9 Aug 2014 15:43:08 +0200
Subject: Fix parsing of times in parse_datetimearg()

Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
---
 src/args.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

(limited to 'src')

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;
 	}
-- 
cgit v1.2.3-70-g09d2