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>
Bu işleme şunda yer alıyor:
Jason A. Donenfeld 2014-01-17 15:41:41 +01:00
ebeveyn 9dde6d38e9
işleme bb3cc0d966

Dosyayı Görüntüle

@ -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);