diff --git a/src/func.zig b/src/func.zig index 2b00999..ef0e09b 100644 --- a/src/func.zig +++ b/src/func.zig @@ -117,7 +117,7 @@ pub const Func = extern struct { comptime var offset = 0; // If the first function parameter accepts a *Caller, pass that in! - if (meta.params[0].type.? == *Caller) { + if (meta.params.len > 0 and meta.params[0].type.? == *Caller) { func_args[0] = caller; offset = 1; }