mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-03-26 22:49:01 +08:00
Fixed findSlotIndex and findBoneIndex return 0 when not found instead of -1.
This commit is contained in:
parent
ad6a3a0736
commit
f738d7e506
@ -75,7 +75,7 @@ int spSkeletonData_findBoneIndex (const spSkeletonData* self, const char* boneNa
|
|||||||
int i;
|
int i;
|
||||||
for (i = 0; i < self->boneCount; ++i)
|
for (i = 0; i < self->boneCount; ++i)
|
||||||
if (strcmp(self->bones[i]->name, boneName) == 0) return i;
|
if (strcmp(self->bones[i]->name, boneName) == 0) return i;
|
||||||
return 0;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
spSlotData* spSkeletonData_findSlot (const spSkeletonData* self, const char* slotName) {
|
spSlotData* spSkeletonData_findSlot (const spSkeletonData* self, const char* slotName) {
|
||||||
@ -89,7 +89,7 @@ int spSkeletonData_findSlotIndex (const spSkeletonData* self, const char* slotNa
|
|||||||
int i;
|
int i;
|
||||||
for (i = 0; i < self->slotCount; ++i)
|
for (i = 0; i < self->slotCount; ++i)
|
||||||
if (strcmp(self->slots[i]->name, slotName) == 0) return i;
|
if (strcmp(self->slots[i]->name, slotName) == 0) return i;
|
||||||
return 0;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
spSkin* spSkeletonData_findSkin (const spSkeletonData* self, const char* skinName) {
|
spSkin* spSkeletonData_findSkin (const spSkeletonData* self, const char* skinName) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user