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-02-05 21:05:08 -04:00
parent 2842345111
commit 0aece06107
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,
};