cell_simple_p(): endianness fix #906

This commit is contained in:
nick black 2020-08-27 09:48:18 -04:00
parent 4c04e1d50e
commit ee649ba0fa
No known key found for this signature in database
GPG Key ID: 5F43400C21CBFACC

View File

@ -256,7 +256,7 @@ cell_egc_idx(const cell* c){
// Is the cell simple (a UTF8-encoded EGC of four bytes or fewer)?
static inline bool
cell_simple_p(const cell* c){
return (c->gcluster >> 24u) != 0x01;
return ((const unsigned char*)&c->gcluster)[0] != 0x01;
}
// only applies to complex cells, do not use on simple cells