aboutsummaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
Diffstat (limited to 'common')
-rw-r--r--common/str-enc.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/common/str-enc.cpp b/common/str-enc.cpp
index 3aba06d58f..7d887e8a65 100644
--- a/common/str-enc.cpp
+++ b/common/str-enc.cpp
@@ -395,7 +395,7 @@ String U32String::encode(CodePage page) const {
page >= ARRAYSIZE(g_codePageMap)) {
error("Invalid codepage");
}
- char *result = Encoding::convert(g_codePageMap[page], "UTF-32", (const char *)_str, _size);
+ char *result = Encoding::convert(g_codePageMap[page], "UTF-32", (const char *)_str, _size * 4);
if (result) {
// Encodings in CodePage all use '\0' as string ending
// That would be problematic if CodePage has UTF-16 or UTF-32