From 2e359e734d8adcef9f830b9d390b24fec710e2cc Mon Sep 17 00:00:00 2001 From: Andri Yngvason Date: Sun, 8 Sep 2019 14:41:22 +0000 Subject: [PATCH] zrle: Fix endianness --- src/zrle.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/zrle.c b/src/zrle.c index 7e2433b..60ab2c7 100644 --- a/src/zrle.c +++ b/src/zrle.c @@ -124,9 +124,9 @@ void pixel32_to_cpixel(uint8_t *restrict dst, CONVERT_PIXELS(cpx, px) - *dst++ = (cpx >> (0 ^ dst_endian_correction)) & 0xff; - *dst++ = (cpx >> 8) & 0xff; *dst++ = (cpx >> (16 ^ dst_endian_correction)) & 0xff; + *dst++ = (cpx >> 8) & 0xff; + *dst++ = (cpx >> (0 ^ dst_endian_correction)) & 0xff; } break; case 2: @@ -137,8 +137,8 @@ void pixel32_to_cpixel(uint8_t *restrict dst, CONVERT_PIXELS(cpx, px) - *dst++ = (cpx >> (0 ^ dst_endian_correction)) & 0xff; *dst++ = (cpx >> (8 ^ dst_endian_correction)) & 0xff; + *dst++ = (cpx >> (0 ^ dst_endian_correction)) & 0xff; } break; case 1: