diff --git a/convert.c b/convert.c index 21908b1039..b288552280 100644 --- a/convert.c +++ b/convert.c @@ -58,6 +58,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--; } /*