diff options
author | Přemysl Eric Janouch <p@janouch.name> | 2021-11-30 22:52:34 +0100 |
---|---|---|
committer | Přemysl Eric Janouch <p@janouch.name> | 2021-11-30 22:53:01 +0100 |
commit | 0d9cb78f036554de8a9adc9196769e1fc709ea39 (patch) | |
tree | 5c8ace3413000916c42e52ea340fd8a3506855cd /fastiv-io.c | |
parent | 1db233648fee07903f030adb4c94d8d76d4c3f8b (diff) | |
download | fiv-0d9cb78f036554de8a9adc9196769e1fc709ea39.tar.gz fiv-0d9cb78f036554de8a9adc9196769e1fc709ea39.tar.xz fiv-0d9cb78f036554de8a9adc9196769e1fc709ea39.zip |
Force sanitizers for debug builds
Diffstat (limited to 'fastiv-io.c')
-rw-r--r-- | fastiv-io.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/fastiv-io.c b/fastiv-io.c index c40b589..b955622 100644 --- a/fastiv-io.c +++ b/fastiv-io.c @@ -299,8 +299,8 @@ load_wuffs_frame(struct load_wuffs_frame_context *ctx, GError **error) uint32_t *out = (uint32_t *) surface_data; for (uint32_t y = 0; y < ctx->height; y++) { for (uint32_t x = 0; x < ctx->width; x++) { - uint16_t b = *in++, g = *in++, r = *in++, x = *in++; - *out++ = (x >> 14) << 30 | + uint32_t b = *in++, g = *in++, r = *in++, X = *in++; + *out++ = (X >> 14) << 30 | (r >> 6) << 20 | (g >> 6) << 10 | (b >> 6); } } @@ -1671,8 +1671,8 @@ read_spng_thumbnail( ihdr.color_type == SPNG_COLOR_TYPE_TRUECOLOR_ALPHA || !spng_get_trns(ctx, &trns)) { for (size_t i = size / sizeof *data; i--; ) { - const uint8_t *unit = (const uint8_t *) &data[i], - a = unit[3], + const uint8_t *unit = (const uint8_t *) &data[i]; + uint32_t a = unit[3], b = unit[2] * a / 255, g = unit[1] * a / 255, r = unit[0] * a / 255; |