projects
/
u
/
mdw
/
putty
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Trim trailing whitespace off saved session names on the command line
[u/mdw/putty]
/
window.c
diff --git
a/window.c
b/window.c
index
89a8c11
..
74339b4
100644
(file)
--- a/
window.c
+++ b/
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.
*/
if (*p == '@') {
+ int i = strlen(p);
+ while (i > 1 && isspace(p[i-1]))
+ i--;
+ p[i] = '\0';
do_defaults (p+1, &cfg);
if (!*cfg.host && !do_config()) {
WSACleanup();