Allow new lines and carriage returns for ASCII format output, but do not allow char 127.

This commit is contained in:
Moritz Bunkus 2005-01-09 15:04:18 +00:00
parent d155287638
commit 2dde26104b

View File

@ -46,7 +46,7 @@ print_binary(int level,
ascii_only = true;
for (i = 0; i < size; i++)
if ((p[i] < ' ') || (p[i] > 127)) {
if ((p[i] != '\n') && (p[i] != '\r') && ((p[i] < ' ') || (p[i] >= 127))) {
ascii_only = false;
break;
}