summaryrefslogtreecommitdiff
path: root/core/fxcrt/cfx_seekablestreamproxy.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'core/fxcrt/cfx_seekablestreamproxy.cpp')
-rw-r--r--core/fxcrt/cfx_seekablestreamproxy.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/core/fxcrt/cfx_seekablestreamproxy.cpp b/core/fxcrt/cfx_seekablestreamproxy.cpp
index e610e0a9c3..da1170717a 100644
--- a/core/fxcrt/cfx_seekablestreamproxy.cpp
+++ b/core/fxcrt/cfx_seekablestreamproxy.cpp
@@ -98,8 +98,8 @@ void UTF16ToWChar(void* pBuffer, FX_STRSIZE iLength) {
uint16_t* pSrc = static_cast<uint16_t*>(pBuffer);
wchar_t* pDst = static_cast<wchar_t*>(pBuffer);
- while (--iLength >= 0)
- pDst[iLength] = static_cast<wchar_t>(pSrc[iLength]);
+ for (FX_STRSIZE i = 0; i < iLength; i++)
+ pDst[i] = static_cast<wchar_t>(pSrc[i]);
}
void SwapByteOrder(wchar_t* pStr, FX_STRSIZE iLength) {