diff options
Diffstat (limited to 'source/blender/blenlib/BLI_array.h')
-rw-r--r-- | source/blender/blenlib/BLI_array.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/blenlib/BLI_array.h b/source/blender/blenlib/BLI_array.h index a5453f1537b..9fa66e91393 100644 --- a/source/blender/blenlib/BLI_array.h +++ b/source/blender/blenlib/BLI_array.h @@ -177,11 +177,11 @@ * 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) \ |