Disable log.txt, errorlog.txt, and config.cfg from being "loadable" (exec-runnable) from the addfile menu.

This commit is contained in:
toasterbabe 2017-05-08 21:04:26 +01:00
parent 06721bd041
commit 54ac157c6c
2 changed files with 11 additions and 1 deletions

View File

@ -697,6 +697,16 @@ boolean preparefilemenu(boolean samedepth)
ext |= EXT_LOADED;
}
}
else if (ext == EXT_TXT)
{
if (!strcmp(dent->d_name, "log.txt") || !strcmp(dent->d_name, "errorlog.txt"))
ext |= EXT_LOADED;
}
else if (ext == EXT_CFG)
{
if (!strcmp(dent->d_name, "config.cfg"))
ext |= EXT_LOADED;
}
folder = 0;
}

View File

@ -4906,7 +4906,7 @@ static void M_DrawAddons(void)
V_DrawSmallScaledPatch(x-(16+4), y, (flags & V_TRANSLUCENT), addonsp[((UINT8)(dirmenu[i][DIR_TYPE]) & ~EXT_LOADED)]);
if (dirmenu[i][DIR_TYPE] & EXT_LOADED)
if ((dirmenu[i][DIR_TYPE] & EXT_LOADED) && dirmenu[i][DIR_TYPE] >= EXT_LOADSTART)
V_DrawSmallScaledPatch(x-(16+4), y, 0, addonsp[NUM_EXT+3]);
if ((size_t)i == dir_on[menudepthleft])