Merge pull request #12205 from ffskyfan/v3

Update extension.h, amend a really  dangerous macros that may cause memory allocation error
This commit is contained in:
pandamicro 2015-06-14 20:09:57 +08:00
commit 707e9d4d7b
1 changed files with 1 additions and 1 deletions

View File

@ -32,7 +32,7 @@
#define SPINE_EXTENSION_H_
/* All allocation uses these. */
#define MALLOC(TYPE,COUNT) ((TYPE*)_malloc(sizeof(TYPE) * COUNT, __FILE__, __LINE__))
#define MALLOC(TYPE,COUNT) ((TYPE*)_malloc(sizeof(TYPE) * (COUNT), __FILE__, __LINE__))
#define CALLOC(TYPE,COUNT) ((TYPE*)_calloc(COUNT, sizeof(TYPE), __FILE__, __LINE__))
#define NEW(TYPE) CALLOC(TYPE,1)