git-status: Test --ignored behavior
[gitweb.git] / combine-diff.c
index e9abdbd0b9b65c4ff3b36f0bd1cceeb92edd580f..bb1cc96c4e73c90ee327858aa3b36cf2bfe043a4 100644 (file)
@@ -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;