- forbid defcvars from a wadfile

This commit is contained in:
Rachael Alexanderson 2019-12-31 10:24:48 +01:00 committed by drfrag
parent 93dfdc1c33
commit 6f24cc29c9

View file

@ -55,6 +55,7 @@
#include "vm.h"
#include "v_text.h"
#include "w_wad.h"
#include "version.h"
struct FLatchedValue
@ -1963,6 +1964,10 @@ void C_GrabCVarDefaults ()
while ((lump = Wads.FindLump("DEFCVARS", &lastlump)) != -1)
{
// don't parse from wads
if (lastlump > Wads.GetLastLump(Wads.GetIwadNum()))
I_FatalError("Cannot load DEFCVARS from a wadfile!\n");
FScanner sc(lump);
sc.MustGetString();