Fix: Bone collection renaming when empty string

Wrong default value was passed to `BLI_uniquename`.
This default value is used when string is empty after renaming.
the element.

How to reproduce:
- Add bone collection
- double click to rename
- Clear all characters, hit enter (you'll either notice bone collection
  without name or just a suffix)

Pull Request: https://projects.blender.org/blender/blender/pulls/111723
This commit is contained in:
Pratik Borhade
2023-08-31 15:12:27 +02:00
committed by Nathan Vegdahl
parent 726ef2c873
commit c75d6ae0ed

View File

@@ -92,7 +92,7 @@ static void bonecoll_ensure_name_unique(bArmature *armature, BoneCollection *bco
{
BLI_uniquename(&armature->collections,
bcoll,
bcoll->name,
"Bones",
'.',
offsetof(BoneCollection, name),
sizeof(bcoll->name));