From: simon Date: Sat, 5 Aug 2000 08:58:07 +0000 (+0000) Subject: telnet:// URLs don't always have the //. (Incorrect but common.) X-Git-Url: https://git.distorted.org.uk/u/mdw/putty/commitdiff_plain/70887be9ad821c22faf52c87597a707a8320a8cf telnet:// URLs don't always have the //. (Incorrect but common.) git-svn-id: svn://svn.tartarus.org/sgt/putty@518 cda61777-01e9-0310-a592-d414129be87e --- diff --git a/window.c b/window.c index 5acddc72..6c67b592 100644 --- a/window.c +++ b/window.c @@ -174,14 +174,16 @@ int WINAPI WinMain(HINSTANCE inst, HINSTANCE prev, LPSTR cmdline, int show) { } else if (*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 * Telnet URL. */ - if (!strncmp(q, "telnet://", 9)) { + if (!strncmp(q, "telnet:", 7)) { char c; - q += 9; + q += 7; + if (q[0] == '/' && q[1] == '/') + q += 2; cfg.protocol = PROT_TELNET; p = q; while (*p && *p != ':' && *p != '/') p++;