From: Ben Harris Date: Sun, 5 Jan 2003 22:52:11 +0000 (+0000) Subject: SC in "finding an actual bug" shocker! Set the port number before passing X-Git-Tag: r8855-g4f798d~1839 X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=commitdiff_plain;h=26cd473d9549baad13ccbf3e5f0bda7e953be56e;p=PuTTY_svn.git SC in "finding an actual bug" shocker! Set the port number before passing it to name_lookup(). git-svn-id: http://svn.tartarus.org/sgt/putty@2473 cda61777-01e9-0310-a592-d414129be87e --- diff --git a/x11fwd.c b/x11fwd.c index d21441b9..5a83db22 100644 --- a/x11fwd.c +++ b/x11fwd.c @@ -200,6 +200,8 @@ char *x11_init(Socket * s, char *display, void *c, void *auth) strcpy(host, "localhost"); } + port = 6000 + displaynum; + /* * Try to find host. */ @@ -207,8 +209,6 @@ char *x11_init(Socket * s, char *display, void *c, void *auth) if ((err = sk_addr_error(addr)) != NULL) return err; - port = 6000 + displaynum; - /* * Open socket. */