diff options
author | Junio C Hamano <gitster@pobox.com> | 2012-04-26 21:35:25 +0400 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2012-04-26 21:35:26 +0400 |
commit | 10a20b43c3d03ea1fab9095f96eda66086d3dcd2 (patch) | |
tree | 79461cf56448cbf12a214fb69ed1e566f0b4bf49 /combine-diff.c | |
parent | b4bd6bb356795ef817d44d65c16bba7f192ab29e (diff) | |
parent | e5e9b56528294e9455d22d1abb21ad32f098a1be (diff) |
Merge branch 'rs/combine-diff-zero-context-at-the-beginning' into maint
An age-old corner case bug in combine diff (only triggered with -U0
and the hunk at the beginning of the file needs to be shown) has been
fixed.
By René Scharfe
* rs/combine-diff-zero-context-at-the-beginning:
combine-diff: fix loop index underflow
Diffstat (limited to 'combine-diff.c')
-rw-r--r-- | combine-diff.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/combine-diff.c b/combine-diff.c index a2e8dcf855..9786680368 100644 --- a/combine-diff.c +++ b/combine-diff.c @@ -423,7 +423,7 @@ static int make_hunks(struct sline *sline, unsigned long cnt, hunk_begin, j); la = (la + context < cnt + 1) ? (la + context) : cnt + 1; - while (j <= --la) { + while (la && j <= --la) { if (sline[la].flag & mark) { contin = 1; break; |