From 0443c708ddf70d5e44dd97493afab3b143e92af4 Mon Sep 17 00:00:00 2001 From: fgsfds Date: Sun, 29 Dec 2024 14:47:42 +0100 Subject: [PATCH] port: align size of bg light block to 4 this avoids unaligned accesses on ARM --- port/src/preprocess/filebg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/port/src/preprocess/filebg.c b/port/src/preprocess/filebg.c index 6ff407310..56b750e4a 100644 --- a/port/src/preprocess/filebg.c +++ b/port/src/preprocess/filebg.c @@ -224,7 +224,7 @@ static void convertPrimaryLights(u8 *dst, u32 *dstpos, u8 *src, u32 *srcpos, u32 } *srcpos += sizeof(*n64_lights) * num_lights; - *dstpos += sizeof(*host_lights) * num_lights; + *dstpos += ALIGN(sizeof(*host_lights) * num_lights, 4); } #define BLOCK_LEAF 0