mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2025-12-21 01:36:02 +08:00
[cocos2dx] Closes #1710, MALLOC is not available in cocos2dx 3.x.
This commit is contained in:
parent
9dbc4b408a
commit
4927c2be63
@ -178,7 +178,7 @@ char *Cocos2dExtension::_readFile(const spine::String &path, int *length) {
|
|||||||
return ret;
|
return ret;
|
||||||
#else
|
#else
|
||||||
*length = static_cast<int>(data.getSize());
|
*length = static_cast<int>(data.getSize());
|
||||||
char* bytes = MALLOC(char, *length);
|
auto bytes = SpineExtension::alloc<char>(*length, __FILE__, __LINE__);
|
||||||
memcpy(bytes, data.getBytes(), *length);
|
memcpy(bytes, data.getBytes(), *length);
|
||||||
return bytes;
|
return bytes;
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user