Fix networked addfile command erroring twice for already added files

This commit is contained in:
James R 2023-03-26 02:32:44 -07:00
parent aab248b25c
commit 4475823058

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);
}