2
0
Эх сурвалжийг харах

Merge pull request #6 from MathemanFlo/fix_material

Fix multibyte characters in material name
Lubos Lenco 4 жил өмнө
parent
commit
81c2d993fa

+ 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() {