From ef40007720141bab80ea7189ab37cd02585c50d8 Mon Sep 17 00:00:00 2001 From: Martin Michelsen Date: Fri, 22 Dec 2023 16:45:44 -0800 Subject: [PATCH] fix CHALLENGE16 text encoding --- src/Text.hh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Text.hh b/src/Text.hh index e70a7fe4..1ce75692 100644 --- a/src/Text.hh +++ b/src/Text.hh @@ -427,7 +427,7 @@ struct pstring { return std::string(reinterpret_cast(&this->data[0]), this->used_chars_8()); case TextEncoding::CHALLENGE16: { std::string decrypted(reinterpret_cast(&this->data[0]), this->used_chars_16() * 2); - decrypt_challenge_rank_text_t(decrypted.data(), decrypted.size()); + decrypt_challenge_rank_text_t(decrypted.data(), decrypted.size() / 2); return tt_utf16_to_utf8(decrypted.data(), decrypted.size()); } case TextEncoding::MARKED: {