diff options
Diffstat (limited to 'builtin')
-rw-r--r-- | builtin/mailinfo.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/builtin/mailinfo.c b/builtin/mailinfo.c index eaf9e157a3..dd8b67cfaa 100644 --- a/builtin/mailinfo.c +++ b/builtin/mailinfo.c @@ -160,10 +160,9 @@ static int slurp_attr(const char *line, const char *name, struct strbuf *attr) const char *ends, *ap = strcasestr(line, name); size_t sz; - if (!ap) { - strbuf_setlen(attr, 0); + strbuf_setlen(attr, 0); + if (!ap) return 0; - } ap += strlen(name); if (*ap == '"') { ap++; |