-rw-r--r-- | parsing.c | 6 | ||||
-rw-r--r-- | ui-shared.c | 4 |
2 files changed, 7 insertions, 3 deletions
@@ -221,3 +221,3 @@ struct commitinfo *cgit_parse_commit(struct commit *commit) ret->author_email = substr(p, t); - ret->author_date = atol(++t); + ret->author_date = atol(t+1); p = strchr(t, '\n') + 1; @@ -232,3 +232,3 @@ struct commitinfo *cgit_parse_commit(struct commit *commit) ret->committer_email = substr(p, t); - ret->committer_date = atol(++t); + ret->committer_date = atol(t+1); p = strchr(t, '\n') + 1; @@ -317,3 +317,3 @@ struct taginfo *cgit_parse_tag(struct tag *tag) ret->tagger_email = substr(p, t); - ret->tagger_date = atol(++t); + ret->tagger_date = atol(t+1); } diff --git a/ui-shared.c b/ui-shared.c index be2c75d..3e13c86 100644 --- a/ui-shared.c +++ b/ui-shared.c @@ -306,2 +306,4 @@ void cgit_print_date(time_t secs, char *format) + if (!secs) + return; time = gmtime(&secs); @@ -315,2 +317,4 @@ void cgit_print_age(time_t t, time_t max_relative, char *format) + if (!t) + return; time(&now); |