summaryrefslogtreecommitdiff
path: root/core/fxcrt/fx_system.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'core/fxcrt/fx_system.cpp')
-rw-r--r--core/fxcrt/fx_system.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/core/fxcrt/fx_system.cpp b/core/fxcrt/fx_system.cpp
index 27cbd65f3c..061ca6d82d 100644
--- a/core/fxcrt/fx_system.cpp
+++ b/core/fxcrt/fx_system.cpp
@@ -203,6 +203,7 @@ int FXSYS_WideCharToMultiByte(uint32_t codepage,
}
return len;
}
+
int FXSYS_MultiByteToWideChar(uint32_t codepage,
uint32_t dwFlags,
const char* bstr,
@@ -211,9 +212,8 @@ int FXSYS_MultiByteToWideChar(uint32_t codepage,
int buflen) {
int wlen = 0;
for (int i = 0; i < blen; i++) {
- if (buf && wlen < buflen) {
- buf[wlen] = bstr[i];
- }
+ if (buf && wlen < buflen)
+ buf[wlen] = reinterpret_cast<const uint8_t*>(bstr)[i];
wlen++;
}
return wlen;