From 381b1876bb2fb230d7ada8d64479da7f207bb159 Mon Sep 17 00:00:00 2001 From: simon Date: Sun, 13 May 2001 13:23:12 +0000 Subject: [PATCH] Trim leading whitespace off the hostname if it's there. git-svn-id: svn://svn.tartarus.org/sgt/putty@1120 cda61777-01e9-0310-a592-d414129be87e --- window.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/window.c b/window.c index 761097e5..269d08f8 100644 --- a/window.c +++ b/window.c @@ -302,6 +302,14 @@ int WINAPI WinMain(HINSTANCE inst, HINSTANCE prev, LPSTR cmdline, int show) } } + /* + * Trim leading whitespace off the hostname if it's there. + */ + { + int space = strspn(cfg.host, " \t"); + memmove(cfg.host, cfg.host+space, 1+strlen(cfg.host)-space); + } + /* See if host is of the form user@host */ if (cfg.host[0] != '\0') { char *atsign = strchr(cfg.host, '@'); -- 2.11.0