aboutsummaryrefslogtreecommitdiff
path: root/xs_unicode.h
diff options
context:
space:
mode:
authorgrunfink <grunfink@noreply.codeberg.org>2026-01-25 10:09:03 +0100
committergrunfink <grunfink@noreply.codeberg.org>2026-01-25 10:09:03 +0100
commitc0bc43ee6593853c5b12f2f6fdc304657b32f839 (patch)
treeda671b218b706bc4fc87031f7c8ddeb021004fe2 /xs_unicode.h
parentc6b411ac34e80505517bf120153017ec42943d4e (diff)
parent456a70a7ba2531e5a874ed2ea8bb221d2c0921f0 (diff)
Merge pull request 'OOB-fix' (#532) from byte/snac2:OOB-fix into master
Reviewed-on: https://codeberg.org/grunfink/snac2/pulls/532
Diffstat (limited to 'xs_unicode.h')
-rw-r--r--xs_unicode.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/xs_unicode.h b/xs_unicode.h
index 7686dcd..493cfde 100644
--- a/xs_unicode.h
+++ b/xs_unicode.h
@@ -232,7 +232,7 @@ unsigned int *_xs_unicode_upper_search(unsigned int cpoint)
/* searches for an uppercase codepoint in the case fold table */
{
int b = 0;
- int t = xs_countof(xs_unicode_case_fold_table) / 2 + 1;
+ int t = xs_countof(xs_unicode_case_fold_table) / 2 - 1;
while (t >= b) {
int n = (b + t) / 2;