Assert that the port numbers are set prior to being used

This commit is contained in:
Cameron Gutman
2021-07-02 01:44:11 -05:00
parent cdda221d64
commit 3b9d8a3176
6 changed files with 29 additions and 6 deletions

View File

@@ -46,6 +46,8 @@ static void VideoPingThreadProc(void* context) {
char pingData[] = { 0x50, 0x49, 0x4E, 0x47 };
LC_SOCKADDR saddr;
LC_ASSERT(VideoPortNumber != 0);
memcpy(&saddr, &RemoteAddr, sizeof(saddr));
SET_PORT(&saddr, VideoPortNumber);