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:
parent
9dc526d0f9
commit
a47fccaa63
@ -658,8 +658,8 @@ static bool diff(FILE* fp[2], char *file[2])
|
|||||||
}
|
}
|
||||||
|
|
||||||
for (j = 0; j < 2; j++)
|
for (j = 0; j < 2; j++)
|
||||||
for (k = v[j].a; k < v[j].b; k++)
|
for (k = v[j].a; k <= v[j].b; k++)
|
||||||
nonempty |= (ix[j][k+1] - ix[j][k] != 1);
|
nonempty |= (ix[j][k] - ix[j][k - 1] != 1);
|
||||||
|
|
||||||
vec = xrealloc_vector(vec, 6, ++idx);
|
vec = xrealloc_vector(vec, 6, ++idx);
|
||||||
memcpy(vec[idx], v, sizeof(v));
|
memcpy(vec[idx], v, sizeof(v));
|
||||||
|
Loading…
Reference in New Issue
Block a user