mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-03-22 10:52:23 +00:00
Bail out if there are no more free gametype slots.
This commit is contained in:
parent
edddc3e64e
commit
d050e04dae
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…
Reference in a new issue