shithub: choc

Download patch

ref: 8ae83694b626d2e3998361b538adf89f64742bd7
parent: 25b70033bf57b57008b235a258c728efd13a08b2
author: Turo Lamminen <turol@iki.fi>
date: Tue Feb 4 08:34:41 EST 2020

doom: Make gamedescription always dynamically allocated

--- a/src/doom/d_main.c
+++ b/src/doom/d_main.c
@@ -845,8 +845,6 @@
 
 static void D_SetGameDescription(void)
 {
-    gamedescription = "Unknown";
-
     if (logical_gamemission == doom)
     {
         // Doom 1.  But which version?
@@ -894,6 +892,11 @@
         {
             gamedescription = GetGameName("DOOM 2: TNT - Evilution");
         }
+    }
+
+    if (gamedescription == NULL)
+    {
+        gamedescription = M_StringDuplicate("Unknown");
     }
 }