git-fmt-patch: thinkofix to show [PATCH] properly.
Updating "subject" variable without changing the hardcoded number of bytes to memcpy from it would not help much. Signed-off-by: Junio C Hamano <junkio@cox.net>
This commit is contained in:
parent
91efcf6065
commit
53f420ef00
5
commit.c
5
commit.c
@ -574,8 +574,9 @@ unsigned long pretty_print_commit(enum cmit_fmt fmt, const struct commit *commit
|
||||
}
|
||||
|
||||
if (subject) {
|
||||
memcpy(buf + offset, subject, 9);
|
||||
offset += 9;
|
||||
int slen = strlen(subject);
|
||||
memcpy(buf + offset, subject, slen);
|
||||
offset += slen;
|
||||
}
|
||||
memset(buf + offset, ' ', indent);
|
||||
memcpy(buf + offset + indent, line, linelen);
|
||||
|
Loading…
Reference in New Issue
Block a user