mirror of
https://github.com/kovidgoyal/kitty.git
synced 2026-05-13 08:26:56 +00:00
Fix endianness bug reported in issue #8548
This commit is contained in:
parent
af1075c3f6
commit
afd0bacb6a
1 changed files with 7 additions and 0 deletions
|
|
@ -48,8 +48,15 @@ static_assert(sizeof(GPUCell) == 20, "Fix the ordering of GPUCell");
|
|||
|
||||
typedef union CPUCell {
|
||||
struct {
|
||||
#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
|
||||
char_type ch_or_idx: sizeof(char_type) * 8 - 1;
|
||||
char_type ch_is_idx: 1;
|
||||
#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
|
||||
char_type ch_is_idx: 1;
|
||||
char_type ch_or_idx: sizeof(char_type) * 8 - 1;
|
||||
#else
|
||||
#error "Unsupported endianness"
|
||||
#endif
|
||||
char_type hyperlink_id: sizeof(hyperlink_id_type) * 8;
|
||||
char_type next_char_was_wrapped : 1;
|
||||
char_type is_multicell : 1;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue