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
commit 954127d533

View file

@ -4500,6 +4500,7 @@ static void Command_Addfile(void)
memset(md5sum,0,16);
#else
FILE *fhandle;
boolean valid = true;
if ((fhandle = W_OpenWadFile(&fn, true)) != NULL)
{
@ -4517,9 +4518,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);
}