소스 검색

fixed invalid utf8_length handling of 0x7F char

Nicolas Cannasse 6 년 전
부모
커밋
6b627b35fb
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      src/std/string.c

+ 1 - 1
src/std/string.c

@@ -86,7 +86,7 @@ HL_PRIM int hl_utf8_length( const vbyte *s, int pos ) {
 	while( true ) {
 		unsigned char c = (unsigned)*s;
 		len++;
-		if( c < 0x7F ) {
+		if( c < 0x80 ) {
 			if( c == 0 ) {
 				len--;
 				break;