From 5ca4d2d1c5e8fd6e5d8ccdb8c56a62412f74bb1d Mon Sep 17 00:00:00 2001 From: Simon Tatham Date: Sat, 5 Aug 2000 08:58:07 +0000 Subject: [PATCH] telnet:// URLs don't always have the //. (Incorrect but common.) [originally from svn r518] --- 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++;