From ebd7b0fbc378e9beca0b275c5cd9150c930bde56 Mon Sep 17 00:00:00 2001 From: Lars Hjemli Date: Sat, 3 Feb 2007 16:11:41 +0100 Subject: Do not die if tag has no message Signed-off-by: Lars Hjemli --- parsing.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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; -- cgit v1.2.3-24-g4f1b