fixed lua_pcall from being retarded... hopefully

This commit is contained in:
abux 2026-07-27 09:56:29 +01:00
parent 82e63e783a
commit 71ed95d2ba

View file

@ -199,7 +199,7 @@ pub fn pcall(self: *Self, comptime ReturnType: type, nargs: u32) !ReturnType {
.@"struct" => |s| if (s.is_tuple) @intCast(s.fields.len) else @as(c_int, 1),
else => 1,
};
if (lua.lua_pcall(self.state, @intCast(nargs), nresults, 0) != 0) {
if (@as(i32, lua.lua_pcall(self.state, @intCast(nargs), nresults, 0)) != 0) {
return self.luaError();
}
if (ReturnType == void) return {};