Fix -p breaking everything

Specifying a port set `ret` to the port number instead of `WS_SUCCESS`
which meant that everything after parameter passing failed silently.
pull/435/head
Andrew Hutchings 2022-07-29 10:14:34 +01:00
parent ec873e1088
commit b6924ff604
1 changed files with 1 additions and 0 deletions

View File

@ -757,6 +757,7 @@ int main(int argc, char** argv)
else {
if (ret <= (word16)-1) {
port = (word16)ret;
ret = WS_SUCCESS;
}
else {
printf("Port number %d too big.\n", ret);