]> granicus.if.org Git - cgit/commitdiff
Do not die if tag has no message
authorLars Hjemli <hjemli@gmail.com>
Sat, 3 Feb 2007 15:11:41 +0000 (16:11 +0100)
committerLars Hjemli <hjemli@gmail.com>
Sun, 4 Feb 2007 20:21:46 +0000 (21:21 +0100)
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
parsing.c

index 8aad1dd39ee531713a19fb902dbcacf2a77ccfa9..1013dad6efa984a6d96efcce88b5c3b2b4ea38c6 100644 (file)
--- 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;