telnet:// URLs don't always have the //. (Incorrect but common.)
authorsimon <simon@cda61777-01e9-0310-a592-d414129be87e>
Sat, 5 Aug 2000 08:58:07 +0000 (08:58 +0000)
committersimon <simon@cda61777-01e9-0310-a592-d414129be87e>
Sat, 5 Aug 2000 08:58:07 +0000 (08:58 +0000)
git-svn-id: svn://svn.tartarus.org/sgt/putty@518 cda61777-01e9-0310-a592-d414129be87e

window.c

index 5acddc7..6c67b59 100644 (file)
--- 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++;