1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-05-29 15:54:48 -05:00

telnet:// URLs don't always have the //. (Incorrect but common.)

[originally from svn r518]
This commit is contained in:
Simon Tatham 2000-08-05 08:58:07 +00:00
parent 6187f9746e
commit 5ca4d2d1c5

View File

@ -174,14 +174,16 @@ int WINAPI WinMain(HINSTANCE inst, HINSTANCE prev, LPSTR cmdline, int show) {
} else if (*p) { } else if (*p) {
char *q = p; char *q = p;
/* /*
* If the hostname starts with "telnet://", set the * If the hostname starts with "telnet:", set the
* protocol to Telnet and process the string as a * protocol to Telnet and process the string as a
* Telnet URL. * Telnet URL.
*/ */
if (!strncmp(q, "telnet://", 9)) { if (!strncmp(q, "telnet:", 7)) {
char c; char c;
q += 9; q += 7;
if (q[0] == '/' && q[1] == '/')
q += 2;
cfg.protocol = PROT_TELNET; cfg.protocol = PROT_TELNET;
p = q; p = q;
while (*p && *p != ':' && *p != '/') p++; while (*p && *p != ':' && *p != '/') p++;