diff options
author | iphydf <iphydf@users.noreply.github.com> | 2018-05-23 12:36:04 +0000 |
---|---|---|
committer | iphydf <iphydf@users.noreply.github.com> | 2018-05-23 14:46:50 +0000 |
commit | d8efdf17ad46eddd3000862db31658b08f4478a4 (patch) | |
tree | 433649b13d2d9e24f59af0c7ba5e369767d97b45 /toxcore/network.c | |
parent | 461c8f51f5c7165884cb556443ba8950532b46eb (diff) |
Fix ipport_isset: port 0 is not a valid port.
Diffstat (limited to 'toxcore/network.c')
-rw-r--r-- | toxcore/network.c | 4 |
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) | |||
1128 | bool ipport_isset(const IP_Port *ipport) | 1128 | bool 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); |