1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-01-09 17:38:00 +00:00

Strip off and ignore `:port' on the end of a hostname.

[originally from svn r1099]
This commit is contained in:
Simon Tatham 2001-05-06 15:09:32 +00:00
parent 3730ada5ce
commit c1c1bc4715

View File

@ -299,6 +299,11 @@ int WINAPI WinMain(HINSTANCE inst, HINSTANCE prev, LPSTR cmdline, int show)
memmove(cfg.host, atsign + 1, 1 + strlen(atsign + 1));
}
}
/*
* Trim a colon suffix off the hostname if it's there.
*/
cfg.host[strcspn(cfg.host, ":")] = '\0';
}
/*