fix(util): resolve bug in setHalf function

introduced in 472215b4c2
This commit is contained in:
Rekai Nyangadzayi Musuka 2022-10-30 04:12:58 -03:00
parent ca67ca3183
commit f80799a593
1 changed files with 1 additions and 1 deletions

View File

@ -314,7 +314,7 @@ pub inline fn setHalf(comptime T: type, left: T, addr: u8, right: HalfInt(T)) T
},
u16 => switch (offset) {
0b0 => (left & 0xFF00) | right,
0b1 => (right & 0x00FF) | @as(u16, right) << 8,
0b1 => (left & 0x00FF) | @as(u16, right) << 8,
},
else => @compileError("unsupported type"),
};