mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2024-12-27 21:01:04 +00:00
Efficiency improvement in whitelist check
Thanks Inu!
This commit is contained in:
parent
a68e92690f
commit
569f7d15d1
1 changed files with 1 additions and 1 deletions
|
@ -158,7 +158,7 @@ static int io_open (lua_State *L) {
|
|||
const char *filename = luaL_checkstring(L, 1);
|
||||
int pass = 0; int i;
|
||||
int length = strlen(filename) - 1;
|
||||
for (i = 0; i < 5; i++) // wolfs == noobcoder, so manually change this with any added file types
|
||||
for (i = 0; i < (sizeof (whitelist) / sizeof(const char *)); i++)
|
||||
{
|
||||
if (!stricmp(&filename[length - (strlen(whitelist[i]) - 1)], whitelist[i]))
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue