tangled
alpha
login
or
join now
rockorager.dev
/
comlink
2
fork
atom
an experimental irc client
2
fork
atom
overview
issues
pulls
pipelines
lua: fix arg qty for execUserCommand
rockorager.dev
1 year ago
d65a3dcd
b84f597f
verified
This commit was signed with the committer's
known signature
.
rockorager.dev
SSH Key Fingerprint:
SHA256:qn/Fjy7CpbcogGEPB14Y53hLnQleZNFY9lkQnuudFLs=
+2
-1
1 changed file
expand all
collapse all
unified
split
src
lua.zig
+2
-1
src/lua.zig
···
167
167
168
168
switch (lua_type) {
169
169
.function => lua.protectedCall(.{
170
170
-
.args = 0,
170
170
+
.args = 1,
171
171
.results = 0,
172
172
.msg_handler = 0,
173
173
}) catch |err| {
···
427
427
428
428
/// Add a user command to the command list
429
429
fn addCommand(lua: *Lua) i32 {
430
430
+
assert(lua.getTop() == 2);
430
431
lua.argCheck(lua.isString(1), 1, "expected a string"); // [string, function]
431
432
lua.argCheck(lua.isFunction(2), 2, "expected a function"); // [string, function]
432
433
const ref = lua.ref(registry_index) catch lua.raiseErrorStr("couldn't ref function", .{}); // [string]