[cocos2dx] Closes #1710, MALLOC is not available in cocos2dx 3.x.

This commit is contained in:
badlogic 2020-08-26 16:20:46 +02:00
parent 9dbc4b408a
commit 4927c2be63

View File

@ -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