summaryrefslogtreecommitdiffstats
path: root/lib/skin_parser
diff options
context:
space:
mode:
Diffstat (limited to 'lib/skin_parser')
-rw-r--r--lib/skin_parser/skin_buffer.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/skin_parser/skin_buffer.c b/lib/skin_parser/skin_buffer.c
index d18122ef20..021746ba82 100644
--- a/lib/skin_parser/skin_buffer.c
+++ b/lib/skin_parser/skin_buffer.c
@@ -80,8 +80,8 @@ void* skin_buffer_alloc(size_t size)
{
void *retval = NULL;
#endif
- /* 32-bit aligned */
- size = (size + 3) & ~3;
+ /* align to long which is enough for most types */
+ size = (size + sizeof(long) - 1) & ~(sizeof(long) - 1);
if (size > skin_buffer_freespace())
{
skin_error(MEMORY_LIMIT_EXCEEDED, NULL);