mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-02-04 14:24:53 +08:00
fix crash (#2270)
This commit is contained in:
parent
77e2e34e8f
commit
4ca219668e
@ -984,8 +984,8 @@ spSkeletonData *spSkeletonJson_readSkeletonData(spSkeletonJson *self, const char
|
||||
|
||||
skeleton = Json_getItem(root, "skeleton");
|
||||
if (skeleton) {
|
||||
MALLOC_STR(skeletonData->hash, Json_getString(skeleton, "hash", 0));
|
||||
MALLOC_STR(skeletonData->version, Json_getString(skeleton, "spine", 0));
|
||||
MALLOC_STR(skeletonData->hash, Json_getString(skeleton, "hash", "0"));
|
||||
MALLOC_STR(skeletonData->version, Json_getString(skeleton, "spine", "0"));
|
||||
if (!string_starts_with(skeletonData->version, SPINE_VERSION_STRING)) {
|
||||
char errorMsg[255];
|
||||
sprintf(errorMsg, "Skeleton version %s does not match runtime version %s", skeletonData->version, SPINE_VERSION_STRING);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user