fix(nas): use wordsEncoding for UTF16 strings profanity words

made a mistake using the unitcd instead of wordsEncoding due to a bad copy-paste, my bad
This commit is contained in:
Jonathan Barrow 2026-01-12 22:34:37 -05:00
parent eab5f7a0c0
commit f32c507a90
No known key found for this signature in database
GPG Key ID: 2A7DAA6DED5A77E5

View File

@ -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]))
}