diff options
author | Junio C Hamano <gitster@pobox.com> | 2012-04-16 12:41:59 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2012-04-16 12:41:59 -0700 |
commit | f84e8b6069e87230bf4d13f845748c58d599c572 (patch) | |
tree | 190d1b3634b1830fb24ed9f44cc7cd9c2ba460ab /combine-diff.c | |
parent | c0599f6993413360d8e35679a6b421d4eb16a698 (diff) | |
parent | e5e9b56528294e9455d22d1abb21ad32f098a1be (diff) | |
download | git-f84e8b6069e87230bf4d13f845748c58d599c572.tar.gz |
Merge branch 'rs/combine-diff-zero-context-at-the-beginning'
Fixes 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).
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; |