mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-01-03 05:32:54 +00:00
Bail out if there are no more free gametype slots.
This commit is contained in:
parent
1edc72a3b8
commit
aa0081f70b
1 changed files with 4 additions and 0 deletions
|
|
@ -2734,6 +2734,10 @@ static int lib_gAddGametype(lua_State *L)
|
|||
// pop gametype table
|
||||
lua_pop(L, 1);
|
||||
|
||||
// Ran out of gametype slots
|
||||
if (gametypecount == NUMGAMETYPEFREESLOTS)
|
||||
return luaL_error(L, "Ran out of free gametype slots!");
|
||||
|
||||
// Set defaults
|
||||
if (gtname == NULL)
|
||||
gtname = Z_StrDup("Unnamed gametype");
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue