cocos2d-x / plugin-x

Plugin-x is the plugin repository for cocos2d-x, it also provides a unified API for plugins.
71 stars 92 forks source link

Error when calling function with BOOL result on iOS #147

Open shkatulo opened 9 years ago

shkatulo commented 9 years ago

There are bugs in PluginUtilsIOS::callOCBoolFunctionWithName_oneParam and PluginUtilsIOS::callOCBoolFunctionWithName functions.

Instead of:

BOOL* pRet = (BOOL*)callRetFunction...(...); if (nil != pRet) { ret = pRet; }

There should be:

NSNumber* pRet = (NSNumber*)callRetFunction...(...); if (nil != pRet) { ret = [pRet boolValue]; }