Merge branch 'fix-addfile-double-error' into 'master'

Fix networked addfile command erroring twice for already added files

See merge request KartKrew/Kart!1100
This commit is contained in:
toaster 2023-03-26 13:30:35 +00:00 committed by NepDisk
parent 038c401d8b
commit 372e655d70

View file

@ -4419,6 +4419,7 @@ static void Command_Addfile(void)
memset(md5sum,0,16);
#else
FILE *fhandle;
boolean valid = true;
if ((fhandle = W_OpenWadFile(&fn, true)) != NULL)
{
@ -4436,9 +4437,15 @@ static void Command_Addfile(void)
if (!memcmp(wadfiles[i]->md5sum, md5sum, 16))
{
CONS_Alert(CONS_ERROR, M_GetText("%s is already loaded\n"), fn);
continue;
valid = false;
break;
}
}
if (valid == false)
{
continue;
}
#endif
WRITEMEM(buf_p, md5sum, 16);
}