浏览代码

Fix material loading #3126

Ray 2 年之前
父节点
当前提交
6094869e3e
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/external/tinyobj_loader_c.h

+ 1 - 1
src/external/tinyobj_loader_c.h

@@ -746,7 +746,7 @@ static int tinyobj_parse_and_index_mtl_file(tinyobj_material_t **materials_out,
   (*materials_out) = NULL;
   (*num_materials_out) = 0;
 
-  fp = fopen(filename, "r");
+  fp = fopen(filename, "rt");
   if (!fp) {
     fprintf(stderr, "TINYOBJ: Error reading file '%s': %s (%d)\n", filename, strerror(errno), errno);
     return TINYOBJ_ERROR_FILE_OPERATION;