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_block.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libcmap_find_block.c') diff --git a/libcmap_find_block.c b/libcmap_find_block.c index 73071c7..fabf8f1 100644 --- a/libcmap_find_block.c +++ b/libcmap_find_block.c @@ -8,7 +8,7 @@ libcmap_find_block(uint32_t codepoint, size_t *offset_out) const struct libcmap_block *list = libcmap_block_list; size_t i, n = libcmap_block_list_size; for (i = 0; i < n; i++) { - if (list[i].range.first <= codepoint && list[i].range.last <= codepoint) { + if (list[i].range.first <= codepoint && codepoint <= list[i].range.last) { if (offset_out) *offset_out = (size_t)(codepoint - list[i].range.first); return &list[i]; -- cgit v1.3.1