Invert logging condition. (#1855)

We don't want to log here normally, only when we detect weird strings.

// FREEBIE
pull/1/head
Michael Kirk 8 years ago committed by GitHub
parent 22aa1d535b
commit 1e3f0fffeb

@ -32,9 +32,9 @@ import Foundation
let characterCount = text.characters.count
// discard any zalgo style text, which we detect by enforcing avg bytes per character ratio.
if byteCount / characterCount > 10 {
Logger.warn("filtering undisplayable text bytes: \(byteCount), characterCount: \(characterCount)")
return true
} else {
Logger.warn("filtering undisplayable text bytes: \(byteCount), characterCount: \(characterCount)")
return false
}
}

Loading…
Cancel
Save