]> source.dussan.org Git - tigervnc.git/commitdiff
Properly handle zero-length arguments
authorBrian Hinz <bphinz@users.sourceforge.net>
Sun, 26 Aug 2012 21:04:39 +0000 (21:04 +0000)
committerBrian Hinz <bphinz@users.sourceforge.net>
Sun, 26 Aug 2012 21:04:39 +0000 (21:04 +0000)
git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@4969 3789f03b-4d11-0410-bbf8-ca57d06f2519

java/com/tigervnc/vncviewer/VncViewer.java

index acbdb7f2d8fc38b1739284613b2a6903b43a4b4d..d045e532c8cbe103e4341838539cdd24ee5163ca 100644 (file)
@@ -127,6 +127,9 @@ public class VncViewer extends java.applet.Applet implements Runnable
 
     // Override defaults with command-line options
     for (int i = 0; i < argv.length; i++) {
+      if (argv[i].length() == 0)
+        continue;
+
       if (argv[i].equalsIgnoreCase("-log")) {
         if (++i >= argv.length) usage();
         System.err.println("Log setting: "+argv[i]);