summaryrefslogtreecommitdiffstats
path: root/contrib/libs/utf8proc/utf8proc.c
diff options
context:
space:
mode:
authorYDBot <[email protected]>2025-09-26 05:40:56 +0000
committerYDBot <[email protected]>2025-09-26 05:40:56 +0000
commita7e5af7043672a57f330696519f435f19fcd03d0 (patch)
treefa751accfbb8afcd928340c9078b00453c07dde1 /contrib/libs/utf8proc/utf8proc.c
parentd7cd65635ff05f602b8eb7c6e2a42217057dd2c6 (diff)
parentee5ee24a4d661a146d6142a78050207193937281 (diff)
Merge pull request #25828 from ydb-platform/merge-rightlib-250926-0050
Diffstat (limited to 'contrib/libs/utf8proc/utf8proc.c')
-rw-r--r--contrib/libs/utf8proc/utf8proc.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/contrib/libs/utf8proc/utf8proc.c b/contrib/libs/utf8proc/utf8proc.c
index 29e92ea3f1d..87cec94213d 100644
--- a/contrib/libs/utf8proc/utf8proc.c
+++ b/contrib/libs/utf8proc/utf8proc.c
@@ -101,7 +101,7 @@ UTF8PROC_DLLEXPORT const char *utf8proc_version(void) {
}
UTF8PROC_DLLEXPORT const char *utf8proc_unicode_version(void) {
- return "16.0.0";
+ return "17.0.0";
}
UTF8PROC_DLLEXPORT const char *utf8proc_errmsg(utf8proc_ssize_t errcode) {
@@ -388,7 +388,7 @@ static utf8proc_ssize_t seqindex_write_char_decomposed(utf8proc_uint16_t seqinde
for (; len >= 0; entry++, len--) {
utf8proc_int32_t entry_cp = seqindex_decode_entry(&entry);
- written += utf8proc_decompose_char(entry_cp, dst+written,
+ written += utf8proc_decompose_char(entry_cp, dst ? dst+written : dst,
(bufsize > written) ? (bufsize - written) : 0, options,
last_boundclass);
if (written < 0) return UTF8PROC_ERROR_OVERFLOW;
@@ -578,7 +578,7 @@ UTF8PROC_DLLEXPORT utf8proc_ssize_t utf8proc_decompose_custom(
uc = custom_func(uc, custom_data); /* user-specified custom mapping */
}
decomp_result = utf8proc_decompose_char(
- uc, buffer + wpos, (bufsize > wpos) ? (bufsize - wpos) : 0, options,
+ uc, buffer ? buffer+wpos : buffer, (bufsize > wpos) ? (bufsize - wpos) : 0, options,
&boundclass
);
if (decomp_result < 0) return decomp_result;
@@ -688,8 +688,9 @@ UTF8PROC_DLLEXPORT utf8proc_ssize_t utf8proc_normalize_utf32(utf8proc_int32_t *b
int len = starter_property->comb_length;
utf8proc_int32_t max_second = utf8proc_combinations_second[idx + len - 1];
if (current_char <= max_second) {
+ int off;
// TODO: binary search? arithmetic search?
- for (int off = 0; off < len; ++off) {
+ for (off = 0; off < len; ++off) {
utf8proc_int32_t second = utf8proc_combinations_second[idx + off];
if (current_char < second) {
/* not found */