]> git.ipfire.org Git - thirdparty/git.git/blobdiff - builtin-mailinfo.c
Merge branch 'js/mingw-rename-fix' into maint
[thirdparty/git.git] / builtin-mailinfo.c
index 26d3e5d7af1c9d0f4e0e00143ed157f81ee595d0..e890f7a6d1ff7248aed4f03ebbcdfafd7e472dad 100644 (file)
@@ -107,7 +107,7 @@ static void handle_from(const struct strbuf *from)
        el = strcspn(at, " \n\t\r\v\f>");
        strbuf_reset(&email);
        strbuf_add(&email, at, el);
-       strbuf_remove(&f, at - f.buf, el + 1);
+       strbuf_remove(&f, at - f.buf, el + (at[el] ? 1 : 0));
 
        /* The remainder is name.  It could be "John Doe <john.doe@xz>"
         * or "john.doe@xz (John Doe)", but we have removed the