mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Don't error when checking patch.valid on invalid patches
This commit is contained in:
parent
307f30b6e3
commit
48e3b8d3fc
1 changed files with 6 additions and 1 deletions
|
|
@ -270,8 +270,13 @@ static int patch_get(lua_State *L)
|
||||||
|
|
||||||
// patches are CURRENTLY always valid, expected to be cached with PU_STATIC
|
// patches are CURRENTLY always valid, expected to be cached with PU_STATIC
|
||||||
// this may change in the future, so patch.valid still exists
|
// this may change in the future, so patch.valid still exists
|
||||||
if (!patch)
|
if (!patch) {
|
||||||
|
if (field == patch_valid) {
|
||||||
|
lua_pushboolean(L, 0);
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
return LUA_ErrInvalid(L, "patch_t");
|
return LUA_ErrInvalid(L, "patch_t");
|
||||||
|
}
|
||||||
|
|
||||||
switch (field)
|
switch (field)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue