break early if server frame count is ahead of NOINPUT

This commit is contained in:
Brad Parker 2017-02-28 21:46:48 -05:00
parent dbd359ad6a
commit 96650e14ea

View File

@ -563,8 +563,15 @@ static bool netplay_get_cmd(netplay_t *netplay,
RARCH_ERR("Failed to receive NETPLAY_CMD_NOINPUT payload.\n");
return netplay_cmd_nak(netplay, connection);
}
frame = ntohl(frame);
if (frame < netplay->server_frame_count)
{
/* We already had this, so ignore the new transmission */
break;
}
if (frame != netplay->server_frame_count)
{
RARCH_ERR("NETPLAY_CMD_NOINPUT for invalid frame.\n");