Fix WEBP_ALIGN in case the argument is a pointer to a type larger than a byte.

Change-Id: Id74a70aa02be813cdf3ab4407ce207bcd647a6a4
This commit is contained in:
Marcin Kowalczyk 2016-04-29 19:53:56 +00:00 committed by James Zern
parent 2309fd5c1d
commit 5f95589fae

View File

@ -51,7 +51,7 @@ WEBP_EXTERN(void) WebPSafeFree(void* const ptr);
// Alignment
#define WEBP_ALIGN_CST 31
#define WEBP_ALIGN(PTR) ((uintptr_t)((PTR) + WEBP_ALIGN_CST) & ~WEBP_ALIGN_CST)
#define WEBP_ALIGN(PTR) (((uintptr_t)(PTR) + WEBP_ALIGN_CST) & ~WEBP_ALIGN_CST)
#if defined(WEBP_FORCE_ALIGNED)
#include <string.h>