Fix display/port switch at display 100
168b92c broke the handling that assumes display 100 and above are
actually a port number.
diff --git a/common/rfb/Hostname.h b/common/rfb/Hostname.h
index 02c51a6..bd68dc0 100644
--- a/common/rfb/Hostname.h
+++ b/common/rfb/Hostname.h
@@ -84,17 +84,14 @@
throw rdr::Exception("invalid port specified");
if (portStart[1] != ':')
- portStart += 1;
- else {
- portStart += 2;
- basePort = 0;
- }
-
- *port = strtol(portStart, &end, 10);
+ *port = strtol(portStart + 1, &end, 10);
+ else
+ *port = strtol(portStart + 2, &end, 10);
if (*end != '\0')
throw rdr::Exception("invalid port specified");
- *port += basePort;
+ if ((portStart[1] != ':') && (*port < 100))
+ *port += basePort;
}
}