diff --git a/src/donar.c b/src/donar.c index 6aa704a..825977d 100644 --- a/src/donar.c +++ b/src/donar.c @@ -62,11 +62,11 @@ int main(int argc, char** argv) { if (is_server) { struct donar_server_ctx ctx; - if (exposed_ports->len < 1 && remote_ports->len) goto in_error; + if (exposed_ports->len < 1 && remote_ports->len < 1) goto in_error; donar_server(&ctx, &as, exposed_ports, remote_ports); } else if (is_client) { struct donar_client_ctx ctx; - if ((exposed_ports->len < 1 && remote_ports->len) || onion_file == NULL) goto in_error; + if ((exposed_ports->len < 1 && remote_ports->len < 1) || onion_file == NULL) goto in_error; donar_client(&ctx, &as, onion_file, exposed_ports, remote_ports); } goto terminate;