diff --git a/commit.c b/commit.c
index d534c9ba586ddf75be9104aa3d4a3845a54d39f2..c7bb8dba64d37a6733f521c166d24e348778965b 100644 (file)
--- a/commit.c
+++ b/commit.c
while (len--) {
char c = *msg++;
+ if (!c)
+ break;
ret++;
if (c == '\n')
break;
- if (!c)
- return 0;
}
return ret;
}