mirror of
https://github.com/dankamongmen/notcurses
synced 2025-03-09 17:19:03 -04:00
rgba_trans_q: replace illegal type punning with memcpy
This commit is contained in:
parent
21c0d0a215
commit
08e6fefb25
@ -33,7 +33,9 @@ trilerp(uint32_t c0, uint32_t c1, uint32_t c2){
|
||||
|
||||
static inline unsigned
|
||||
rgba_trans_q(const unsigned char* p, uint32_t transcolor){
|
||||
return rgba_trans_p(*(const uint32_t*)p, transcolor);
|
||||
uint32_t q;
|
||||
memcpy(&q, p, sizeof(q));
|
||||
return rgba_trans_p(q, transcolor);
|
||||
}
|
||||
|
||||
// Retarded RGBA blitter (ASCII only).
|
||||
|
Loading…
x
Reference in New Issue
Block a user