summaryrefslogtreecommitdiffhomepage
path: root/src/utf8code.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/utf8code.c')
-rw-r--r--src/utf8code.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/utf8code.c b/src/utf8code.c
index 4abf10ea..e326e6b9 100644
--- a/src/utf8code.c
+++ b/src/utf8code.c
@@ -105,10 +105,10 @@ int utf8_icmp_sv(const csview s1, const csview s2) {
utf8_decode_t d1 = {.state=0}, d2 = {.state=0};
intptr_t j1 = 0, j2 = 0;
while ((j1 < s1.size) & (j2 < s2.size)) {
- do { utf8_decode(&d1, (uint8_t)s1.str[j1++]); } while (d1.state);
- do { utf8_decode(&d2, (uint8_t)s2.str[j2++]); } while (d2.state);
+ do { utf8_decode(&d1, (uint8_t)s1.buf[j1++]); } while (d1.state);
+ do { utf8_decode(&d2, (uint8_t)s2.buf[j2++]); } while (d2.state);
int32_t c = (int32_t)utf8_casefold(d1.codep) - (int32_t)utf8_casefold(d2.codep);
- if (c || !s2.str[j2 - 1]) // OK if s1.size and s2.size are npos
+ if (c || !s2.buf[j2 - 1]) // OK if s1.size and s2.size are npos
return (int)c;
}
return (int)(s1.size - s2.size);