AFBClient: fix port sanity check
[staging/windowmanager.git] / AFBClient.cpp
index fbffb2c..1677509 100644 (file)
@@ -172,7 +172,7 @@ int AFBClient::Impl::init(int port, char const *token) {
         }
     }
 
-    if (port < 1 && port > 0xffff) {
+    if (port < 1 || port > 0xffff) {
         fputs("Port is invalid\n", stderr);
         rc = -EINVAL;
         goto fail;