Fix binary printing bug
This commit is contained in:
parent
c3e8f013d2
commit
15986b04ff
@ -28,8 +28,6 @@ struct filedata readfile(FILE *fp) {
|
||||
die("fread");
|
||||
}
|
||||
|
||||
f.lc = 10000;
|
||||
|
||||
// guess if printable
|
||||
// from https://github.com/sharkdp/content_inspector/blob/master/src/lib.rs
|
||||
int testlen = f.buflen >= 64 ? 64 : f.buflen;
|
||||
|
@ -50,7 +50,7 @@ void run(FILE *fp, char *filename, bool tty) {
|
||||
free(f.lines[i].buf);
|
||||
}
|
||||
} else {
|
||||
printf("%s", f.buf);
|
||||
fwrite(f.buf, 1, f.buflen, stdout);
|
||||
}
|
||||
free(f.buf);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user