Assert that the port numbers are set prior to being used

This commit is contained in:
Cameron Gutman committed 2021-07-02 01:44:11 -05:00
1 parent cdda221d64
commit 3b9d8a3176
6 files changed
+29 -6

No files matched your search

+2
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);