diff options
author | Přemysl Eric Janouch <p@janouch.name> | 2024-03-13 18:46:20 +0100 |
---|---|---|
committer | Přemysl Eric Janouch <p@janouch.name> | 2024-03-13 18:47:05 +0100 |
commit | 115a7bab0f1dffe6ada32a814618952c635008ea (patch) | |
tree | 95bedc1810fce85861028dd9057ad8b7a0eab7d9 /fiv-io.c | |
parent | 91538aaba53f294b1739e5055266ff17df7b6a54 (diff) | |
download | fiv-115a7bab0f1dffe6ada32a814618952c635008ea.tar.gz fiv-115a7bab0f1dffe6ada32a814618952c635008ea.tar.xz fiv-115a7bab0f1dffe6ada32a814618952c635008ea.zip |
Fix a build issue, and a big endian conversion
Diffstat (limited to 'fiv-io.c')
-rw-r--r-- | fiv-io.c | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -1538,9 +1538,11 @@ load_libwebp_frame(WebPAnimDecoder *dec, const WebPAnimInfo *info, if (G_BYTE_ORDER == G_LITTLE_ENDIAN) { memcpy(dst, buf, area * sizeof *dst); } else { - uint32_t *src = (uint32_t *) buf; - for (uint64_t i = 0; i < area; i++) - *dst++ = GUINT32_FROM_LE(*src++); + const uint32_t *src = (const uint32_t *) buf; + for (uint64_t i = 0; i < area; i++) { + uint32_t value = *src++; + *dst++ = GUINT32_FROM_LE(value); + } } // info->bgcolor is not reliable. |