chore: dont use std.mem.bytesToValue
the stdlib accounts for endianness, which isn't something we want.
This commit is contained in:
parent
8006ca31e6
commit
2cb1bf834a
|
@ -40,7 +40,8 @@ fn parseTitle(buf: []u8) [12]u8 {
|
||||||
}
|
}
|
||||||
|
|
||||||
fn lookupMaker(slice: *const [2]u8) ?[]const 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",
|
0x3130 => "Nintendo",
|
||||||
else => null,
|
else => null,
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue