aboutsummaryrefslogtreecommitdiff
path: root/lib/unicode
diff options
context:
space:
mode:
authorThomas Voss <mail@thomasvoss.com> 2024-05-04 01:06:05 +0200
committerThomas Voss <mail@thomasvoss.com> 2024-05-04 01:06:05 +0200
commit80547771dec846193f8ed963e93290baeae6fa5d (patch)
tree7e55fa818acb5c97af2cd8671d2a8b09b73a6492 /lib/unicode
parenta81d691fe639b2db877c915fbb60ce326307aab9 (diff)
Add tests for u8lower() and fix ‘ς’ bug
Diffstat (limited to 'lib/unicode')
-rw-r--r--lib/unicode/string/u8lower.c6
1 files changed, 4 insertions, 2 deletions
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