mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-03-26 22:49:01 +08:00
[godot] Fix incorrect altas utf8 string length, closes #2094.
This commit is contained in:
parent
63065eefed
commit
c72ea8c652
@ -274,7 +274,6 @@ void SpineAnimationTrack::update_animation_state(const Variant &variant_sprite)
|
|||||||
auto animation_player_path = scene_path.rel_path_to(animation_player->get_path());
|
auto animation_player_path = scene_path.rel_path_to(animation_player->get_path());
|
||||||
for (int i = 0; i < edited_animation->get_track_count(); i++) {
|
for (int i = 0; i < edited_animation->get_track_count(); i++) {
|
||||||
auto path = edited_animation->track_get_path(i);
|
auto path = edited_animation->track_get_path(i);
|
||||||
auto node = Node::get_node_or_null(path);
|
|
||||||
if (path == animation_player_path) {
|
if (path == animation_player_path) {
|
||||||
found_track_index = i;
|
found_track_index = i;
|
||||||
break;
|
break;
|
||||||
|
|||||||
@ -161,7 +161,8 @@ Error SpineAtlasResource::load_from_atlas_file(const String &path) {
|
|||||||
|
|
||||||
clear();
|
clear();
|
||||||
texture_loader = new GodotSpineTextureLoader(&textures, &normal_maps, normal_map_prefix);
|
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 atlas_utf8 = atlas_data.utf8();
|
||||||
|
atlas = new spine::Atlas(atlas_utf8, atlas_utf8.length(), source_path.get_base_dir().utf8(), texture_loader);
|
||||||
if (atlas) return OK;
|
if (atlas) return OK;
|
||||||
|
|
||||||
clear();
|
clear();
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user