fix for error found while looking into #30221
authorCampbell Barton <ideasman42@gmail.com>
Fri, 17 Feb 2012 00:08:52 +0000 (00:08 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Fri, 17 Feb 2012 00:08:52 +0000 (00:08 +0000)
macro needed parentheses.

source/blender/blenlib/BLI_array.h

index a5453f1537b27e812708ad4be6098261f3f56d0f..9fa66e913934b1f3aa4223660aff7f6faad6294c 100644 (file)
  * same purpose as BLI_array_staticdeclare()
  * but use when the max size is known ahead of time */
 #define BLI_array_fixedstack_declare(arr, maxstatic, realsize, allocstr)      \
-       char _##arr##_static[maxstatic*sizeof(*arr)];                             \
+       char _##arr##_static[maxstatic*sizeof(*(arr))];                           \
        const int _##arr##_is_static= ((void *)_##arr##_static) != (              \
-           arr= (realsize <= maxstatic) ?                                        \
+           arr= ((realsize) <= maxstatic) ?                                      \
                (void *)_##arr##_static :                                         \
-               MEM_mallocN(sizeof(*arr)*realsize, allocstr)                      \
+               MEM_mallocN(sizeof(*(arr)) * (realsize), allocstr)                \
            )                                                                     \
 
 #define BLI_array_fixedstack_free(arr)                                        \