X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=convert.c;h=78efed800d4d64898d438d9590b01be008cfcd36;hb=6b9315d5a14b4d1389cff347fcfcb86624bbf645;hp=352b69d4ceeec411a81469a6146e023aa1d6b338;hpb=7be9467204de4680e84c366cb30ff05c1c10edbd;p=git.git diff --git a/convert.c b/convert.c index 352b69d4c..78efed800 100644 --- a/convert.c +++ b/convert.c @@ -61,6 +61,10 @@ static void gather_stats(const char *buf, unsigned long size, struct text_stat * else stats->printable++; } + + /* If file ends with EOF then don't count this EOF as non-printable. */ + if (size >= 1 && buf[size-1] == '\032') + stats->nonprintable--; } /*