commit | bb3cc0d9666553608b7c89aef84d21d3312ce488 | [log] [tgz] |
---|---|---|
author | Jason A. Donenfeld <Jason@zx2c4.com> | Fri Jan 17 15:41:41 2014 +0100 |
committer | Jason A. Donenfeld <Jason@zx2c4.com> | Fri Jan 17 15:41:41 2014 +0100 |
tree | 59d848b8d24c807b5f1c3c107d3e01d59e11c257 | |
parent | 9dde6d38e9fc273fc62386eeda0da2e89a2cebfc [diff] [blame] |
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>
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 @@ 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);