aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Lars Hjemli <hjemli@gmail.com>2007-02-04 00:11:41 (JST)
committerGravatar Lars Hjemli <hjemli@gmail.com>2007-02-05 05:21:46 (JST)
commitebd7b0fbc378e9beca0b275c5cd9150c930bde56 (patch)
tree6ee9ef66be06b164732bcc77930b9186c2819da9
parentbb3e7950c39b67e863a618b3a0e766544b65d3cb (diff)
downloadcgit-ebd7b0fbc378e9beca0b275c5cd9150c930bde56.zip
cgit-ebd7b0fbc378e9beca0b275c5cd9150c930bde56.tar.gz
Do not die if tag has no message
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
-rw-r--r--parsing.c4
1 files 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)
220 220
221 p = data; 221 p = data;
222 222
223 while (p) { 223 while (p && *p) {
224 if (*p == '\n') 224 if (*p == '\n')
225 break; 225 break;
226 226
@@ -238,7 +238,7 @@ struct taginfo *cgit_parse_tag(struct tag *tag)
238 238
239 while (p && (*p == '\n')) 239 while (p && (*p == '\n'))
240 p = strchr(p, '\n') + 1; 240 p = strchr(p, '\n') + 1;
241 if (p) 241 if (p && *p)
242 ret->msg = xstrdup(p); 242 ret->msg = xstrdup(p);
243 free(data); 243 free(data);
244 return ret; 244 return ret;