Author: Lars Hjemli <hjemli@gmail.com>
Do not die if tag has no message Signed-off-by: Lars Hjemli <hjemli@gmail.com>
parsing.c | 4 ++--
diff --git a/parsing.c b/parsing.c index 8aad1dd39ee531713a19fb902dbcacf2a77ccfa9..1013dad6efa984a6d96efcce88b5c3b2b4ea38c6 100644 --- a/parsing.c +++ b/parsing.c @@ -220,7 +220,7 @@ ret->msg = NULL; p = data; - while (p) { + while (p && *p) { if (*p == '\n') break; @@ -238,7 +238,7 @@ } while (p && (*p == '\n')) p = strchr(p, '\n') + 1; - if (p) + if (p && *p) ret->msg = xstrdup(p); free(data); return ret;