Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--builtin-shortlog.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/builtin-shortlog.c b/builtin-shortlog.c
index 48a2a0b0d3..26212b009c 100644
--- a/builtin-shortlog.c
+++ b/builtin-shortlog.c
@@ -108,13 +108,15 @@ static void insert_author_oneline(struct path_list *list,
free(buffer);
if (!strncmp(oneline, "[PATCH", 6)) {
- char *eob = strchr(buffer, ']');
-
- while (isspace(eob[1]) && eob[1] != '\n')
- eob++;
- if (eob - oneline < onelinelen) {
- onelinelen -= eob - oneline;
- oneline = eob;
+ char *eob = strchr(oneline, ']');
+
+ if (eob) {
+ while (isspace(eob[1]) && eob[1] != '\n')
+ eob++;
+ if (eob - oneline < onelinelen) {
+ onelinelen -= eob - oneline;
+ oneline = eob;
+ }
}
}