about summary refs log tree commit diff
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2014-01-17 15:41:41 +0100
committerJason A. Donenfeld <Jason@zx2c4.com>2014-01-17 15:41:41 +0100
commitbb3cc0d9666553608b7c89aef84d21d3312ce488 (patch)
tree59d848b8d24c807b5f1c3c107d3e01d59e11c257
parentauth: document tweakables in lua script (diff)
downloadcgit-pink-bb3cc0d9666553608b7c89aef84d21d3312ce488.tar.gz
cgit-pink-bb3cc0d9666553608b7c89aef84d21d3312ce488.zip
ui-shared: do not allow negative minutes
Do to timestamp differences, sometimes cgit would should "-0 min", which
doesn't make any sense.

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to '')
-rw-r--r--ui-shared.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/ui-shared.c b/ui-shared.c
index 883866d..1ede2b0 100644
--- a/ui-shared.c
+++ b/ui-shared.c
@@ -596,6 +596,8 @@ void cgit_print_age(time_t t, time_t max_relative, const char *format)
 		return;
 	time(&now);
 	secs = now - t;
+	if (secs < 0)
+		secs = 0;
 
 	if (secs > max_relative && max_relative >= 0) {
 		cgit_print_date(t, format, ctx.cfg.local_time);
00'>2018-02-05Rename gfxx space indexed and add palette samplingJune McEnroe 2018-02-05Take scale into account for when to stop drawing in gfxxJune McEnroe 2018-02-05Always skip most significant bits in gfxxJune McEnroe 2018-02-05Set title in gfcocoaJune McEnroe 2018-02-05Double-buffer gfb frontendJune McEnroe 2018-02-05Rewrite gfxx bit handlingJune McEnroe 2018-02-05Add flip option to gfxxJune McEnroe 2018-02-05Remove gfxx reverse optionJune McEnroe 2018-02-04Fix gfxx draw stop conditionJune McEnroe 2018-02-04Reuse CGColorSpace and CGDataProvider in gfcocoaJune McEnroe 2018-02-04Mark mac target phonyJune McEnroe 2018-02-04Set up Makefile for gfxx-cocoa or gfxx-fbJune McEnroe 2018-02-04Avoid doing excessive work in gfxxJune McEnroe 2018-02-04Handle window resizing in gfcocoaJune McEnroe 2018-02-04Set cinoptionsJune McEnroe 2018-02-04Tweak colorscheme moreJune McEnroe 2018-02-04Color MatchParen DarkYellowJune McEnroe 2018-02-04Add palette sampling to gfxxJune McEnroe 2018-02-04Add 4-bit RGB to gfxxJune McEnroe 2018-02-04Add Quit menu item to gfcocoaJune McEnroe 2018-02-04Switch back to sane Objective-C styleJune McEnroe 2018-02-04Quit gfcocoa when window closesJune McEnroe 2018-02-03Apparently this is how people write Objective-CJune McEnroe