Skip to content

Commit

Permalink
cstrings cannot be compared with == or !=
Browse files Browse the repository at this point in the history
  • Loading branch information
ClayJay3 committed Mar 15, 2024
1 parent a393f55 commit 94e98e5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/RoveComm/RoveCommUDP.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ namespace rovecomm
}

// Send the packet to the specified IP address and port
if (cIPAddress != "0.0.0.0" && nPort != 0)
if (std::strcmp(cIPAddress, "0.0.0.0") && nPort != 0)
{
saUDPClientAddr.sin_port = htons(nPort);
inet_pton(AF_INET, cIPAddress, &saUDPClientAddr.sin_addr);
Expand Down

0 comments on commit 94e98e5

Please sign in to comment.