chore: dont use std.mem.bytesToValue

the stdlib accounts for endianness, which isn't something we want.
This commit is contained in:
Rekai Nyangadzayi Musuka 2022-10-21 05:12:16 -03:00
parent 8006ca31e6
commit 2cb1bf834a
1 changed files with 2 additions and 1 deletions

View File

@ -40,7 +40,8 @@ fn parseTitle(buf: []u8) [12]u8 {
}
fn lookupMaker(slice: *const [2]u8) ?[]const u8 {
return switch (std.mem.bytesToValue(u16, slice)) {
const id = @as(u16, slice[1]) << 8 | @as(u16, slice[0]);
return switch (id) {
0x3130 => "Nintendo",
else => null,
};