hopefully get the logic right this time

This commit is contained in:
Folkert 2021-09-01 15:56:50 +02:00
parent 4731cbd391
commit 3ef4a40f45
2 changed files with 14 additions and 9 deletions

View file

@ -69,7 +69,7 @@ const Alignment = extern struct {
const VALUE_BEFORE_KEY_FLAG: u8 = 0b1000_0000;
fn toU32(self: Alignment) u32 {
if (self.bits & Alignment.VALUE_BEFORE_KEY_FLAG == 1) {
if (self.bits >= VALUE_BEFORE_KEY_FLAG) {
return self.bits ^ Alignment.VALUE_BEFORE_KEY_FLAG;
} else {
return self.bits;