Merge branch 'customgametypeswtf' into 'next'

Fix broken GT_ constants with custom gametypes

See merge request STJr/SRB2!769
This commit is contained in:
Jaime Passos 2020-02-08 23:17:35 -05:00
commit 2162cbd794
1 changed files with 2 additions and 2 deletions

View File

@ -3256,8 +3256,8 @@ void G_AddGametypeConstant(INT16 gtype, const char *newgtconst)
{
size_t r = 0; // read
size_t w = 0; // write
char *gtconst = Z_Calloc(strlen(newgtconst) + 3, PU_STATIC, NULL);
char *tmpconst = Z_Calloc(strlen(newgtconst), PU_STATIC, NULL);
char *gtconst = Z_Calloc(strlen(newgtconst) + 4, PU_STATIC, NULL);
char *tmpconst = Z_Calloc(strlen(newgtconst) + 1, PU_STATIC, NULL);
// Copy the gametype name.
strcpy(tmpconst, newgtconst);