From f35267046422a10c50e68d0325ed6daee4369a89 Mon Sep 17 00:00:00 2001 From: Stephen Gutekanst Date: Fri, 27 Dec 2024 17:32:06 -0700 Subject: [PATCH] module: fix object_name_id bug Signed-off-by: Stephen Gutekanst --- src/module.zig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/module.zig b/src/module.zig index 45a27eb7..b0f7b8ba 100644 --- a/src/module.zig +++ b/src/module.zig @@ -539,7 +539,7 @@ pub fn Modules(module_lists: anytype) type { const module_name_id = try m.module_names.indexOrPut(allocator, @tagName(Mod2.mach_module)); inline for (@typeInfo(@TypeOf(mod)).@"struct".fields) |mod_field| { if (@typeInfo(mod_field.type) == .@"struct" and @hasDecl(mod_field.type, "IsMachObjects")) { - const object_name_id = try m.module_names.indexOrPut(allocator, mod_field.name); + const object_name_id = try m.object_names.indexOrPut(allocator, mod_field.name); // TODO: use packed struct(TypeID) here. Same thing, just get the type from central location const object_type_id: u16 = @bitCast(PackedObjectTypeID{