Explorar o código

Better MALLOC macro.

NathanSweet %!s(int64=10) %!d(string=hai) anos
pai
achega
dee4d7f801
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      spine-c/include/spine/extension.h

+ 1 - 1
spine-c/include/spine/extension.h

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