From 80547771dec846193f8ed963e93290baeae6fa5d Mon Sep 17 00:00:00 2001 From: Thomas Voss Date: Sat, 4 May 2024 01:06:05 +0200 Subject: Add tests for u8lower() and fix ‘ς’ bug MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/unicode/string/u8lower.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'lib/unicode/string') diff --git a/lib/unicode/string/u8lower.c b/lib/unicode/string/u8lower.c index f59cf39..63fdae4 100644 --- a/lib/unicode/string/u8lower.c +++ b/lib/unicode/string/u8lower.c @@ -26,7 +26,9 @@ u8lower(char8_t *restrict dst, size_t dstn, const char8_t *src, size_t srcn, struct { bool before; size_t after; - } final_sigma = {}; + } final_sigma = { + .before = true, + }; n = before_dot_cnt = more_above_cnt = 0; @@ -57,7 +59,7 @@ u8lower(char8_t *restrict dst, size_t dstn, const char8_t *src, size_t srcn, } if (final_sigma.after == 0) { - rune ch; + rune ch = 0; struct u8view cpy = {src, srcn}; do -- cgit v1.2.3