Fix OnServerStart/Stop hooks (#225)

Fixes #224
This commit is contained in:
Paul Kulchenko 2021-08-06 04:27:50 -07:00 committed by GitHub
parent 533f3d1ef1
commit fd76fa0016
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1139,7 +1139,7 @@ static inline bool IsHookDefined(const char *s) {
static void CallSimpleHook(const char *s) {
lua_getglobal(L, s);
if (lua_pcall(L, 1, 0, 0) != LUA_OK) {
if (lua_pcall(L, 0, 0, 0) != LUA_OK) {
WARNF("%s: %s", s, lua_tostring(L, -1));
lua_pop(L, 1);
}