Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2020-12-14 10:44:04 +0300
committerCampbell Barton <ideasman42@gmail.com>2020-12-14 12:44:26 +0300
commit088df2bb03f3e8620cab9e466272850a03db5cc8 (patch)
tree7c620118009c5edba7e8a97a4d8a5174988e8063 /source/blender/io/collada/ArmatureImporter.cpp
parentb8ae90263a9b480efd9da79968f6ce7b61a0808b (diff)
Fix missing string escape for RNA path creation
Diffstat (limited to 'source/blender/io/collada/ArmatureImporter.cpp')
-rw-r--r--source/blender/io/collada/ArmatureImporter.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/source/blender/io/collada/ArmatureImporter.cpp b/source/blender/io/collada/ArmatureImporter.cpp
index 9533ca322f9..56716722b46 100644
--- a/source/blender/io/collada/ArmatureImporter.cpp
+++ b/source/blender/io/collada/ArmatureImporter.cpp
@@ -1037,7 +1037,9 @@ void ArmatureImporter::get_rna_path_for_joint(COLLADAFW::Node *node,
char *joint_path,
size_t count)
{
- BLI_snprintf(joint_path, count, "pose.bones[\"%s\"]", bc_get_joint_name(node));
+ char bone_name_esc[sizeof(((Bone *)NULL)->name) * 2];
+ BLI_str_escape(bone_name_esc, bc_get_joint_name(node), sizeof(bone_name_esc));
+ BLI_snprintf(joint_path, count, "pose.bones[\"%s\"]", bone_name_esc);
}
/* gives a world-space mat */