From a02e13ae3ecadef800527b61aab5e02a17d939c7 Mon Sep 17 00:00:00 2001 From: Simon Tatham Date: Mon, 16 Apr 2001 16:19:30 +0000 Subject: [PATCH] Quote the hostname in the `unable to connect' box so that if the user starts up N PuTTYs at once and one reports failure, they know which one. [originally from svn r1051] --- window.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/window.c b/window.c index ec27dc88..4c4360c4 100644 --- a/window.c +++ b/window.c @@ -444,7 +444,9 @@ int WINAPI WinMain(HINSTANCE inst, HINSTANCE prev, LPSTR cmdline, int show) { error = back->init (cfg.host, cfg.port, &realhost); if (error) { - sprintf(msg, "Unable to open connection:\n%s", error); + sprintf(msg, "Unable to open connection to\n" + "%.800s\n" + "%s", cfg.host, error); MessageBox(NULL, msg, "PuTTY Error", MB_ICONERROR | MB_OK); return 0; }