portfwd validation was sometimes not picking up a blank source port
authorjacob <jacob@cda61777-01e9-0310-a592-d414129be87e>
Wed, 16 Feb 2005 12:13:27 +0000 (12:13 +0000)
committerjacob <jacob@cda61777-01e9-0310-a592-d414129be87e>
Wed, 16 Feb 2005 12:13:27 +0000 (12:13 +0000)
git-svn-id: svn://svn.tartarus.org/sgt/putty@5319 cda61777-01e9-0310-a592-d414129be87e

config.c

index 2fc2362..8250e1c 100644 (file)
--- a/config.c
+++ b/config.c
@@ -718,7 +718,7 @@ static void portfwd_handler(union control *ctrl, void *dlg,
            str[i++] = type;
 
            dlg_editbox_get(pfd->sourcebox, dlg, str+i, sizeof(str) - i);
-           if (!str[2]) {
+           if (!str[i]) {
                dlg_error_msg(dlg, "You need to specify a source port number");
                return;
            }