Cmd_Exec_f: simplified condition for Hunk_FreeToLowMark.

This commit is contained in:
Ozkan Sezer 2022-07-03 15:55:40 +03:00
parent 11dd10bd91
commit 8b146122bb

View file

@ -271,9 +271,7 @@ void Cmd_Exec_f (void)
mark = Hunk_LowMark ();
f = (char *)COM_LoadHunkFile (Cmd_Argv(1), NULL);
if (!f && !strcmp(Cmd_Argv(1), "default.cfg"))
{
mark = -1;
if (!f && !strcmp(Cmd_Argv(1), "default.cfg")) {
f = default_cfg; /* see above.. */
}
if (!f)
@ -281,12 +279,12 @@ void Cmd_Exec_f (void)
Con_Printf ("couldn't exec %s\n",Cmd_Argv(1));
return;
}
Con_Printf ("execing %s\n",Cmd_Argv(1));
Cbuf_InsertText (f);
if (mark < 0) return;
Cbuf_InsertText (f);
if (f != default_cfg) {
Hunk_FreeToLowMark (mark);
}
}