summaryrefslogtreecommitdiffstatshomepage
path: root/src/lib/util/unicode.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/util/unicode.cpp')
-rw-r--r--src/lib/util/unicode.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/lib/util/unicode.cpp b/src/lib/util/unicode.cpp
index bd0414a4612..5151a1e101d 100644
--- a/src/lib/util/unicode.cpp
+++ b/src/lib/util/unicode.cpp
@@ -198,9 +198,9 @@ int uchar_from_utf16f(char32_t *uchar, const char16_t *utf16char, size_t count)
{
char16_t buf[2] = {0};
if (count > 0)
- buf[0] = flipendian_int16(utf16char[0]);
+ buf[0] = swapendian_int16(utf16char[0]);
if (count > 1)
- buf[1] = flipendian_int16(utf16char[1]);
+ buf[1] = swapendian_int16(utf16char[1]);
return uchar_from_utf16(uchar, buf, count);
}
@@ -348,9 +348,9 @@ int utf16f_from_uchar(char16_t *utf16string, size_t count, char32_t uchar)
rc = utf16_from_uchar(buf, count, uchar);
if (rc >= 1)
- utf16string[0] = flipendian_int16(buf[0]);
+ utf16string[0] = swapendian_int16(buf[0]);
if (rc >= 2)
- utf16string[1] = flipendian_int16(buf[1]);
+ utf16string[1] = swapendian_int16(buf[1]);
return rc;
}