Closed XZiar closed 6 years ago
https://github.com/WojciechMula/toys/blob/20cd93d83d7eeb8fe66258d2ac0be97e753ed5f6/pixconv16bpp-32bpp/pixconv16bpp-32bpp.c#L90-L94 Why tmp is uint8_t? its value is given by an uint32_t, which may lose information.
tmp
uint32_t
https://github.com/WojciechMula/toys/blob/20cd93d83d7eeb8fe66258d2ac0be97e753ed5f6/pixconv16bpp-32bpp/pixconv16bpp-32bpp.c#L95-L100 It doesn't make sense performing a shift of 16bit on an uint8_t.
I think tmp should be uint32_t.
Is that a bug?
@XZiar it is a bug, thank you for spotting it
Fixed, thanks a lot
https://github.com/WojciechMula/toys/blob/20cd93d83d7eeb8fe66258d2ac0be97e753ed5f6/pixconv16bpp-32bpp/pixconv16bpp-32bpp.c#L90-L94 Why
tmp
is uint8_t? its value is given by anuint32_t
, which may lose information.https://github.com/WojciechMula/toys/blob/20cd93d83d7eeb8fe66258d2ac0be97e753ed5f6/pixconv16bpp-32bpp/pixconv16bpp-32bpp.c#L95-L100 It doesn't make sense performing a shift of 16bit on an uint8_t.
I think tmp should be
uint32_t
.Is that a bug?