Fix update_unread_ptr to handle the case of only slaves connected

This commit is contained in:
Gregor Richards 2017-02-22 21:10:02 -05:00
parent e70ee045bf
commit d1ab288d73

View File

@ -69,9 +69,17 @@ void netplay_update_unread_ptr(netplay_t *netplay)
new_unread_frame_count = netplay->server_frame_count;
}
if (new_unread_frame_count != (uint32_t) -1)
{
netplay->unread_ptr = new_unread_ptr;
netplay->unread_frame_count = new_unread_frame_count;
}
else
{
netplay->unread_ptr = netplay->self_ptr;
netplay->unread_frame_count = netplay->self_frame_count;
}
}
}
/**