From e2b4d40486cd1fe22e6a031b610918e39966bf23 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Fri, 16 Oct 2026 17:57:25 +0200 Subject: Fix libcmap_find_block and libcmap_find_script MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- libcmap_find_script.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libcmap_find_script.c') diff --git a/libcmap_find_script.c b/libcmap_find_script.c index ea39932..7bac658 100644 --- a/libcmap_find_script.c +++ b/libcmap_find_script.c @@ -11,7 +11,7 @@ libcmap_find_script(uint32_t codepoint, size_t *offset_out, size_t *subrange_out for (i = 0; i < n; i++) { skipped = 0; for (j = 0; j < list[i].nranges; j++) { - if (list[i].ranges[j].first <= codepoint && list[i].ranges[j].last <= codepoint) { + if (list[i].ranges[j].first <= codepoint && codepoint <= list[i].ranges[j].last) { if (offset_out) *offset_out = skipped + (size_t)(codepoint - list[i].ranges[j].first); if (subrange_out) -- cgit v1.3.1