diff options
Diffstat (limited to 'src/link/Wasm/Object.zig')
| -rw-r--r-- | src/link/Wasm/Object.zig | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/link/Wasm/Object.zig b/src/link/Wasm/Object.zig index 92336efbf2..c2243bdf10 100644 --- a/src/link/Wasm/Object.zig +++ b/src/link/Wasm/Object.zig @@ -601,8 +601,8 @@ fn Parser(comptime ReaderType: type) type { }); for (relocations) |*relocation| { - const rel_type = try leb.readULEB128(u8, reader); - const rel_type_enum = @intToEnum(types.Relocation.RelocationType, rel_type); + const rel_type = try reader.readByte(); + const rel_type_enum = std.meta.intToEnum(types.Relocation.RelocationType, rel_type) catch return error.MalformedSection; relocation.* = .{ .relocation_type = rel_type_enum, .offset = try leb.readULEB128(u32, reader), |
