mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-05-28 15:24:49 -05:00
Trim trailing whitespace off saved session names on the command line
[originally from svn r728]
This commit is contained in:
parent
a80fa10287
commit
31374678c0
4
window.c
4
window.c
@ -198,6 +198,10 @@ int WINAPI WinMain(HINSTANCE inst, HINSTANCE prev, LPSTR cmdline, int show) {
|
|||||||
* An initial @ means to activate a saved session.
|
* An initial @ means to activate a saved session.
|
||||||
*/
|
*/
|
||||||
if (*p == '@') {
|
if (*p == '@') {
|
||||||
|
int i = strlen(p);
|
||||||
|
while (i > 1 && isspace(p[i-1]))
|
||||||
|
i--;
|
||||||
|
p[i] = '\0';
|
||||||
do_defaults (p+1, &cfg);
|
do_defaults (p+1, &cfg);
|
||||||
if (!*cfg.host && !do_config()) {
|
if (!*cfg.host && !do_config()) {
|
||||||
WSACleanup();
|
WSACleanup();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user