aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--c/enc/memory.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/c/enc/memory.h b/c/enc/memory.h
index f68c035..babf1f8 100644
--- a/c/enc/memory.h
+++ b/c/enc/memory.h
@@ -40,7 +40,7 @@ BROTLI_INTERNAL void BrotliInitMemoryManager(
BROTLI_INTERNAL void* BrotliAllocate(MemoryManager* m, size_t n);
#define BROTLI_ALLOC(M, T, N) \
- ((N) ? ((T*)BrotliAllocate((M), (N) * sizeof(T))) : NULL)
+ ((N) > 0 ? ((T*)BrotliAllocate((M), (N) * sizeof(T))) : NULL)
BROTLI_INTERNAL void BrotliFree(MemoryManager* m, void* p);
#define BROTLI_FREE(M, P) { \