Fix bug in check_utf8() where it would allow all C0 control codes other than LF
This commit is contained in:
parent
114d595ed2
commit
579550468c
|
@ -589,7 +589,7 @@ bool check_utf8(const unsigned char *data, size_t data_length, bool newline_allo
|
|||
// Reject control characters
|
||||
if (codepoint <= 0x1f) {
|
||||
// C0 control character
|
||||
if (!newline_allowed || codepoint == 0x0a) {
|
||||
if (!newline_allowed || codepoint != 0x0a) {
|
||||
return false;
|
||||
}
|
||||
} else if (0x80 <= codepoint && codepoint <= 0x9f) {
|
||||
|
|
Loading…
Reference in New Issue