aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAaro Koskinen <aaro.koskinen@iki.fi>2015-07-30 23:13:25 +0300
committerDenys Vlasenko <vda.linux@googlemail.com>2015-07-31 16:50:49 +0200
commita47fccaa63449182a5d0c11cf03139a072f8c19c (patch)
tree6a6197cb2487e490264360bf778c9cd63d020715
parent9dc526d0f91c37ecdf6280c2cd69107c6102076e (diff)
downloadbusybox-w32-a47fccaa63449182a5d0c11cf03139a072f8c19c.tar.gz
busybox-w32-a47fccaa63449182a5d0c11cf03139a072f8c19c.tar.bz2
busybox-w32-a47fccaa63449182a5d0c11cf03139a072f8c19c.zip
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>
-rw-r--r--editors/diff.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/editors/diff.c b/editors/diff.c
index cf14b1d03..e0adcee59 100644
--- a/editors/diff.c
+++ b/editors/diff.c
@@ -658,8 +658,8 @@ static bool diff(FILE* fp[2], char *file[2])
658 } 658 }
659 659
660 for (j = 0; j < 2; j++) 660 for (j = 0; j < 2; j++)
661 for (k = v[j].a; k < v[j].b; k++) 661 for (k = v[j].a; k <= v[j].b; k++)
662 nonempty |= (ix[j][k+1] - ix[j][k] != 1); 662 nonempty |= (ix[j][k] - ix[j][k - 1] != 1);
663 663
664 vec = xrealloc_vector(vec, 6, ++idx); 664 vec = xrealloc_vector(vec, 6, ++idx);
665 memcpy(vec[idx], v, sizeof(v)); 665 memcpy(vec[idx], v, sizeof(v));