浏览代码

[godot] Closes #2372, fix UTF-8 texture atlas loading.

Mario Zechner 2 年之前
父节点
当前提交
57388824ca
共有 1 个文件被更改,包括 2 次插入1 次删除
  1. 2 1
      spine-godot/spine_godot/SpineAtlasResource.cpp

+ 2 - 1
spine-godot/spine_godot/SpineAtlasResource.cpp

@@ -194,7 +194,8 @@ Error SpineAtlasResource::load_from_file(const String &path) {
 
 	clear();
 	texture_loader = new GodotSpineTextureLoader(&textures, &normal_maps, normal_map_prefix);
-	atlas = new spine::Atlas(atlas_data.utf8(), atlas_data.size(), source_path.get_base_dir().utf8(), texture_loader);
+	auto utf8 = atlas_data.utf8();
+	atlas = new spine::Atlas(utf8.ptr(), utf8.size(), source_path.get_base_dir().utf8(), texture_loader);
 	if (atlas) return OK;
 
 	clear();