From: Lars Hjemli Date: Sat, 3 Feb 2007 15:11:41 +0000 (+0100) Subject: Do not die if tag has no message X-Git-Tag: v0.2~5 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ebd7b0fbc378e9beca0b275c5cd9150c930bde56;p=cgit Do not die if tag has no message Signed-off-by: Lars Hjemli --- diff --git a/parsing.c b/parsing.c index 8aad1dd..1013dad 100644 --- a/parsing.c +++ b/parsing.c @@ -220,7 +220,7 @@ struct taginfo *cgit_parse_tag(struct tag *tag) p = data; - while (p) { + while (p && *p) { if (*p == '\n') break; @@ -238,7 +238,7 @@ struct taginfo *cgit_parse_tag(struct tag *tag) while (p && (*p == '\n')) p = strchr(p, '\n') + 1; - if (p) + if (p && *p) ret->msg = xstrdup(p); free(data); return ret;