From 9cfbe86b0ff586d039b473c9a77e8f5f3c35d5d4 Mon Sep 17 00:00:00 2001 From: Stephen Gutekanst Date: Sun, 7 Apr 2024 13:58:02 -0700 Subject: [PATCH] module: fix missing injected argument check Signed-off-by: Stephen Gutekanst --- src/module/module.zig | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/module/module.zig b/src/module/module.zig index c40a1558..9dc0dd70 100644 --- a/src/module/module.zig +++ b/src/module/module.zig @@ -578,7 +578,10 @@ inline fn injectArgs( continue :outer; } } - if (@typeInfo(arg.type) == .Pointer and @hasDecl(std.meta.Child(arg.type), "IsInjectedArgument")) { + if (@typeInfo(arg.type) == .Pointer and + @typeInfo(std.meta.Child(arg.type)) == .Struct and + @hasDecl(std.meta.Child(arg.type), "IsInjectedArgument")) + { // Argument is declared as injectable, but we do not have a value to inject for it. // This can be the case if e.g. a Mod() parameter is specified, but that module is // not registered.