ref: 263a6fef37d9b6151ead74ed499cb2972877951b
parent: 89900f956372349618c7c2ade8befbff948736c0
author: Turo Lamminen <turol@iki.fi>
date: Tue Feb 4 08:10:20 EST 2020
doom: Allocate deh_gamename with standard malloc
--- a/src/doom/d_main.c
+++ b/src/doom/d_main.c
@@ -695,7 +695,11 @@
// We also need to cut off spaces to get the basic name
gamename_size = strlen(deh_sub) + 10;
- deh_gamename = Z_Malloc(gamename_size, PU_STATIC, 0);
+ deh_gamename = malloc(gamename_size);
+ if (deh_gamename == NULL)
+ {
+ I_Error("GetGameName: Failed to allocate new string");
+ }
version = G_VanillaVersionCode();
M_snprintf(deh_gamename, gamename_size, deh_sub,
version / 100, version % 100);