Skip to content

Commit a23afd0

Browse files
SessionHero01SessionHero01
authored andcommitted
Update libsession-util version
1 parent eb80768 commit a23afd0

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

library/src/main/cpp/util.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -334,8 +334,8 @@ Java_network_loki_messenger_libsession_1util_util_Util_lengthForCodepoints(JNIEn
334334
jint max_codepoints) {
335335
return jni_utils::run_catching_cxx_exception_or_throws<jint>(env, [=]() {
336336
jni_utils::JavaCharsRef str_ref(env, str);
337-
return session::utf16_len_for_codepoints(
338-
{ reinterpret_cast<const char16_t *>(str_ref.chars()), str_ref.size() },
337+
return session::utf16_count_truncated_to_codepoints(
338+
{reinterpret_cast<const char16_t *>(str_ref.chars()), str_ref.size()},
339339
max_codepoints
340340
);
341341
});
@@ -346,5 +346,5 @@ JNIEXPORT jint JNICALL
346346
Java_network_loki_messenger_libsession_1util_util_Util_countCodepoints(JNIEnv *env, jobject thiz,
347347
jstring str) {
348348
jni_utils::JavaCharsRef str_ref(env, str);
349-
return simdutf::count_utf16(reinterpret_cast<const char16_t*>(str_ref.chars()), str_ref.size());
349+
return session::utf16_count({reinterpret_cast<const char16_t*>(str_ref.chars()), str_ref.size()});
350350
}

0 commit comments

Comments
 (0)