소스 검색

Fix multibyte characters in material name

MathemanFlo 4 년 전
부모
커밋
e1fc47e2fa
1개의 변경된 파일3개의 추가작업 그리고 3개의 파일을 삭제
  1. 3 3
      Sources/arm/format/ObjParser.hx

+ 3 - 3
Sources/arm/format/ObjParser.hx

@@ -481,14 +481,14 @@ class ObjParser {
 	}
 
 	function readString(): String {
-		var s = "";
+		var begin = pos;
 		while (true) {
 			var c = bytes.get(pos);
 			if (c == "\n".code || c == "\r".code || c == " ".code) break;
 			pos++;
-			s += String.fromCharCode(c);
 		}
-		return s;
+		
+		return bytes.getString(begin,pos-begin);
 	}
 
 	function nextLine() {