1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-04-10 07:38:06 -05:00

Fix assertion failure that prevents pterm starting up.

When testing the previous commit, I went to great lengths to check all
the tricky corner cases of the detailed command-line argument handling
in Plink and PuTTY, on Windows and Unix. And did I also double-check
that I had not completely broken the very simplest possible invocation
of pterm? I did not.

The call to cmdline_host_ok() in gtkmain.c was failing an assertion in
pterm, because that function only expects to have been called by a
program that has the TOOLTYPE_HOST_ARG flag set - if that flag isn't
set, the program is expected to come up with its own answer to the
question (because I wasn't sure what the right fallback answer would
be). And I forgot to conditionalise the call between PuTTY and pterm.
This commit is contained in:
Simon Tatham 2017-12-08 19:34:35 +00:00
parent b9a25510b0
commit 2a2153f4ce

View File

@ -646,7 +646,10 @@ int main(int argc, char **argv)
cmdline_run_saved(conf);
need_config_box = !cmdline_host_ok(conf);
if (cmdline_tooltype & TOOLTYPE_HOST_ARG)
need_config_box = !cmdline_host_ok(conf);
else
need_config_box = FALSE;
}
if (need_config_box) {