mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2025-12-21 01:36:02 +08:00
[cocos2dx] Closes #1734, simplify file I/O.
This commit is contained in:
parent
0a42f4fe28
commit
1cc50fd09e
@ -167,7 +167,7 @@ Cocos2dExtension::Cocos2dExtension() : DefaultSpineExtension() { }
|
||||
Cocos2dExtension::~Cocos2dExtension() { }
|
||||
|
||||
char *Cocos2dExtension::_readFile(const spine::String &path, int *length) {
|
||||
Data data = FileUtils::getInstance()->getDataFromFile(FileUtils::getInstance()->fullPathForFilename(path.buffer()));
|
||||
Data data = FileUtils::getInstance()->getDataFromFile(path.buffer());
|
||||
if (data.isNull()) return nullptr;
|
||||
|
||||
// avoid buffer overflow (int is shorter than ssize_t in certain platforms)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user