From 57388824ca2779dd20448766d5fac94494a95a0d Mon Sep 17 00:00:00 2001 From: Mario Zechner Date: Fri, 22 Sep 2023 15:41:36 +0200 Subject: [PATCH] [godot] Closes #2372, fix UTF-8 texture atlas loading. --- spine-godot/spine_godot/SpineAtlasResource.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/spine-godot/spine_godot/SpineAtlasResource.cpp b/spine-godot/spine_godot/SpineAtlasResource.cpp index db04b590c..c56ee34e1 100644 --- a/spine-godot/spine_godot/SpineAtlasResource.cpp +++ b/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();