mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-03-03 14:19:09 +08:00
[c] Closes #698, locale reset was still wrong. Thanks @FrankStain.
This commit is contained in:
parent
48568cda2f
commit
3456073765
@ -569,10 +569,11 @@ spSkeletonData* spSkeletonJson_readSkeletonData (spSkeletonJson* self, const cha
|
|||||||
CONST_CAST(char*, self->error) = 0;
|
CONST_CAST(char*, self->error) = 0;
|
||||||
internal->linkedMeshCount = 0;
|
internal->linkedMeshCount = 0;
|
||||||
|
|
||||||
oldLocale = setlocale(LC_NUMERIC, NULL);
|
oldLocale = strdup(setlocale(LC_NUMERIC, NULL));
|
||||||
setlocale(LC_NUMERIC, "C");
|
setlocale(LC_NUMERIC, "C");
|
||||||
root = Json_create(json);
|
root = Json_create(json);
|
||||||
setlocale(LC_NUMERIC, oldLocale);
|
setlocale(LC_NUMERIC, oldLocale);
|
||||||
|
free(oldLocale);
|
||||||
if (!root) {
|
if (!root) {
|
||||||
_spSkeletonJson_setError(self, 0, "Invalid skeleton JSON: ", Json_getError());
|
_spSkeletonJson_setError(self, 0, "Invalid skeleton JSON: ", Json_getError());
|
||||||
return 0;
|
return 0;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user