wok-current view busybox/stuff/busybox-1.22-diff.u @ rev 15960
Up: tazpanel (1.8)
author | Christophe Lincoln <pankso@slitaz.org> |
---|---|
date | Mon Feb 24 01:10:12 2014 +0100 (2014-02-24) |
parents | e30c03f14110 |
children |
line source
1 --- busybox-1.20.0/editors/diff.c
2 +++ busybox-1.20.0/editors/diff.c
3 @@ -756,6 +756,14 @@
4 j = fread(buf1, 1, sz, fp[1]);
5 if (i != j) {
6 differ = true;
7 + /* Ensure we detect binary file even if a file is empty or very
8 + short. */
9 + for (k = 0; k < i; k++)
10 + if (!buf0[k])
11 + binary = true;
12 + for (k = 0; k < j; k++)
13 + if (!buf1[k])
14 + binary = true;
15 i = MIN(i, j);
16 }
17 if (i == 0)