aboutsummaryrefslogtreecommitdiff
path: root/sys/libunicode/find.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/libunicode/find.c')
-rw-r--r--sys/libunicode/find.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/libunicode/find.c b/sys/libunicode/find.c
index 659ab5b..d75feb8 100644
--- a/sys/libunicode/find.c
+++ b/sys/libunicode/find.c
@@ -7,17 +7,18 @@ utf8·find(byte* s, rune c)
rune r;
int n;
- if(c < RuneSync)
+ if(c < Tx)
return strchr(s, c);
for(;;){
c1 = *(ubyte*)s;
- if(c1 < RuneSelf) {
+ if(c1 < Tx){
if(c1 == 0) return nil;
if(c1 == c) return s;
s++;
continue;
}
+
n = utf8·decode(s, &r);
if(r == c)