mirror of
https://github.com/WiiLink24/wfc-server.git
synced 2026-03-21 17:44:58 -05:00
Merge pull request #89 from jonbarrow/feat/updated-profanity-check2
Some checks failed
Build CI / build (push) Has been cancelled
Some checks failed
Build CI / build (push) Has been cancelled
Use `wordsEncoding` for UTF16 strings when decoding profanity words
This commit is contained in:
commit
c9efbc7c52
|
|
@ -411,7 +411,7 @@ func handleProfanity(form url.Values, unitcd string) map[string]string {
|
|||
words = string(wordsBytes)
|
||||
} else {
|
||||
var utf16String []uint16
|
||||
if unitcd == "0" {
|
||||
if wordsEncoding == "UTF-16LE" {
|
||||
for i := 0; i < len(wordsBytes)/2; i++ {
|
||||
utf16String = append(utf16String, binary.LittleEndian.Uint16(wordsBytes[i*2:i*2+2]))
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user