mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2025-04-13 13:51:01 +00:00
Fix possible segfault for cvars registered from lua with flag CV_CALL
This commit is contained in:
parent
20a5adde02
commit
5da6d14aa1
1 changed files with 1 additions and 1 deletions
|
@ -382,7 +382,7 @@ static int lib_cvRegisterVar(lua_State *L)
|
|||
cvar->PossibleValue = cvpv;
|
||||
} else
|
||||
FIELDERROR("PossibleValue", va("%s or CV_PossibleValue_t expected, got %s", lua_typename(L, LUA_TTABLE), luaL_typename(L, -1)))
|
||||
} else if (cvar->flags & CV_CALL && (i == 5 || (k && fasticmp(k, "func")))) {
|
||||
} else if ((i == 5 || (k && fasticmp(k, "func")))) {
|
||||
if (!lua_isfunction(L, 4))
|
||||
TYPEERROR("func", LUA_TFUNCTION)
|
||||
lua_getfield(L, LUA_REGISTRYINDEX, "CV_OnChange");
|
||||
|
|
Loading…
Reference in a new issue