summaryrefslogtreecommitdiff
path: root/libkern/utfecpy.c
diff options
context:
space:
mode:
Diffstat (limited to 'libkern/utfecpy.c')
-rw-r--r--libkern/utfecpy.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libkern/utfecpy.c b/libkern/utfecpy.c
index 8ccb841c..3a5e6b4c 100644
--- a/libkern/utfecpy.c
+++ b/libkern/utfecpy.c
@@ -9,7 +9,7 @@ utfecpy(char *to, char *e, char *from)
return to;
end = memccpy(to, from, '\0', e - to);
if(end == nil){
- end = e-1;
+ end = e;
while(end>to && (*--end&0xC0)==0x80)
;
*end = '\0';