diff: fix -B with single line changes

Fix -B with single line changes. They were always ignored regardless
if they were blank or not.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
Aaro Koskinen 2015-07-30 23:13:25 +03:00 committed by Denys Vlasenko
parent 9dc526d0f9
commit a47fccaa63

View File

@ -658,8 +658,8 @@ static bool diff(FILE* fp[2], char *file[2])
}
for (j = 0; j < 2; j++)
for (k = v[j].a; k < v[j].b; k++)
nonempty |= (ix[j][k+1] - ix[j][k] != 1);
for (k = v[j].a; k <= v[j].b; k++)
nonempty |= (ix[j][k] - ix[j][k - 1] != 1);
vec = xrealloc_vector(vec, 6, ++idx);
memcpy(vec[idx], v, sizeof(v));