From 70887be9ad821c22faf52c87597a707a8320a8cf Mon Sep 17 00:00:00 2001 From: simon Date: Sat, 5 Aug 2000 08:58:07 +0000 Subject: [PATCH] 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 --- window.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) 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++; -- 2.11.0