X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=commit.c;h=c7bb8dba64d37a6733f521c166d24e348778965b;hb=e3a125a94d34d22a8ca53e84949a1bb38cd6e425;hp=d534c9ba586ddf75be9104aa3d4a3845a54d39f2;hpb=028e0491c07f8628d3c94ef01762ad695cc4efa3;p=git.git diff --git a/commit.c b/commit.c index d534c9ba..c7bb8dba 100644 --- a/commit.c +++ b/commit.c @@ -400,11 +400,11 @@ static int get_one_line(const char *msg, unsigned long len) while (len--) { char c = *msg++; + if (!c) + break; ret++; if (c == '\n') break; - if (!c) - return 0; } return ret; }