Skip to content

Commit

Permalink
CR, LF, tab, and some other text characters are below 32 in the ASCII…
Browse files Browse the repository at this point in the history
… table. This should fix short text files from accidentally being marked as binary. Whoops.
  • Loading branch information
ggreer committed Mar 19, 2012
1 parent cb06abb commit 9608148
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/util.c
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ int is_binary(const void* buf, const int buf_len) {
/* NULL char. It's binary */
return(1);
}
else if (buf_c[i] < 32 || buf_c[i] > 127) {
else if ((buf_c[i] < 7 || buf_c[i] > 14) && (buf_c[i] < 32 || buf_c[i] > 127)) {
suspicious_bytes++;
}
}
Expand Down

0 comments on commit 9608148

Please sign in to comment.