summaryrefslogtreecommitdiff
path: root/toxcore/network.c
diff options
context:
space:
mode:
authoriphydf <iphydf@users.noreply.github.com>2018-05-23 12:36:04 +0000
committeriphydf <iphydf@users.noreply.github.com>2018-05-23 14:46:50 +0000
commitd8efdf17ad46eddd3000862db31658b08f4478a4 (patch)
tree433649b13d2d9e24f59af0c7ba5e369767d97b45 /toxcore/network.c
parent461c8f51f5c7165884cb556443ba8950532b46eb (diff)
Fix ipport_isset: port 0 is not a valid port.
Diffstat (limited to 'toxcore/network.c')
-rw-r--r--toxcore/network.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/toxcore/network.c b/toxcore/network.c
index e7e754c5..b29045c3 100644
--- a/toxcore/network.c
+++ b/toxcore/network.c
@@ -1128,11 +1128,11 @@ bool ip_isset(const IP *ip)
1128bool ipport_isset(const IP_Port *ipport) 1128bool ipport_isset(const IP_Port *ipport)
1129{ 1129{
1130 if (!ipport) { 1130 if (!ipport) {
1131 return true; 1131 return false;
1132 } 1132 }
1133 1133
1134 if (!ipport->port) { 1134 if (!ipport->port) {
1135 return true; 1135 return false;
1136 } 1136 }
1137 1137
1138 return ip_isset(&ipport->ip); 1138 return ip_isset(&ipport->ip);