mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-24 13:01:47 +00:00
Merge branch 'master' of https://github.com/Edward850/zdoom
This commit is contained in:
commit
725d3e3f53
1 changed files with 7 additions and 1 deletions
|
@ -293,7 +293,7 @@ void PacketGet (void)
|
|||
return;
|
||||
}
|
||||
}
|
||||
else if (c > 0)
|
||||
else if (node >= 0 && c > 0)
|
||||
{
|
||||
doomcom.data[0] = TransmitBuffer[0] & ~NCMD_COMPRESSED;
|
||||
if (TransmitBuffer[0] & NCMD_COMPRESSED)
|
||||
|
@ -316,6 +316,12 @@ void PacketGet (void)
|
|||
memcpy(doomcom.data + 1, TransmitBuffer + 1, c - 1);
|
||||
}
|
||||
}
|
||||
else if (c > 0)
|
||||
{ //The packet is not from any in-game node, so we might as well discard it.
|
||||
Printf("Dropped packet: Unknown host (%s:%d)\n", inet_ntoa(fromaddress.sin_addr), fromaddress.sin_port);
|
||||
doomcom.remotenode = -1;
|
||||
return;
|
||||
}
|
||||
|
||||
doomcom.remotenode = node;
|
||||
doomcom.datalength = (short)c;
|
||||
|
|
Loading…
Reference in a new issue