an experimental irc client

lua: fix arg qty for execUserCommand

rockorager.dev d65a3dcd b84f597f

verified
+2 -1
+2 -1
src/lua.zig
··· 167 167 168 168 switch (lua_type) { 169 169 .function => lua.protectedCall(.{ 170 - .args = 0, 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 + 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]