From: DRC Date: Thu, 10 Mar 2011 10:30:41 +0000 (+0000) Subject: Oops. Can't increment loop counter, because we don't know yet that we've received... X-Git-Tag: v1.0.90~4 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=e8ec4792c5fdd8497cd67e4d17ccb4b926e0cb62;p=tigervnc.git Oops. Can't increment loop counter, because we don't know yet that we've received an argument that requires an additional parameter. git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/branches/1_1@4353 3789f03b-4d11-0410-bbf8-ca57d06f2519 --- diff --git a/unix/vncserver b/unix/vncserver index 2d25c1b8..2ceb6d88 100755 --- a/unix/vncserver +++ b/unix/vncserver @@ -167,11 +167,11 @@ $securityTypeArgSpecified = 0; $vncAuthEnabled = 0; $passwordArgSpecified = 0; -for ($i=0; $i<@ARGV; ++$i) { +for ($i = 0; $i < @ARGV; ++$i) { # -SecurityTypes can be followed by a space or "=" my @splitargs = split('=', $ARGV[$i]); if (@splitargs <= 1 && $i < @ARGV - 1) { - push(@splitargs, $ARGV[++$i]); + push(@splitargs, $ARGV[$i + 1]); } if (lc(@splitargs[0]) eq "-securitytypes") { if (@splitargs > 1) {