summaryrefslogtreecommitdiff
path: root/sal/rtl/ustring.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sal/rtl/ustring.cxx')
-rw-r--r--sal/rtl/ustring.cxx8
1 files changed, 1 insertions, 7 deletions
diff --git a/sal/rtl/ustring.cxx b/sal/rtl/ustring.cxx
index b1fb82a375dd..3d157270ef3c 100644
--- a/sal/rtl/ustring.cxx
+++ b/sal/rtl/ustring.cxx
@@ -598,13 +598,7 @@ void SAL_CALL rtl_uString_newFromCodePoints(
}
p = (*newString)->buffer;
for (i = 0; i < codePointCount; ++i) {
- sal_uInt32 c = codePoints[i];
- if (c < 0x10000) {
- *p++ = (sal_Unicode) c;
- } else {
- *p++ = rtl::getHighSurrogate(c);
- *p++ = rtl::getLowSurrogate(c);
- }
+ p += rtl::splitSurrogates(codePoints[i], p);
}
RTL_LOG_STRING_NEW( *newString );
}