mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-03-22 14:39:24 -05:00
Trim leading whitespace off the hostname if it's there.
[originally from svn r1120]
This commit is contained in:
parent
8422d9e2e8
commit
93e27a40ae
8
window.c
8
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 */
|
/* See if host is of the form user@host */
|
||||||
if (cfg.host[0] != '\0') {
|
if (cfg.host[0] != '\0') {
|
||||||
char *atsign = strchr(cfg.host, '@');
|
char *atsign = strchr(cfg.host, '@');
|
||||||
|
Loading…
x
Reference in New Issue
Block a user