Also count terminating byte in fileneeded filename

This commit is contained in:
James R 2019-06-20 15:16:23 -07:00
parent db24665856
commit 7f99ebc692

View file

@ -130,7 +130,7 @@ UINT8 *PutFileNeeded(UINT16 firstfile)
nameonly(strcpy(wadfilename, wadfiles[i]->filename)); nameonly(strcpy(wadfilename, wadfiles[i]->filename));
if (p + 1 + 4 + strlen(wadfilename) + 16 > p_start + MAXFILENEEDED) if (p + 1 + 4 + strlen(wadfilename) + 1 + 16 > p_start + MAXFILENEEDED)
{ {
// Too many files to send all at once // Too many files to send all at once
if (netbuffer->packettype == PT_MOREFILESNEEDED) if (netbuffer->packettype == PT_MOREFILESNEEDED)