From: Brian Hinz Date: Sun, 26 Aug 2012 21:04:39 +0000 (+0000) Subject: Properly handle zero-length arguments X-Git-Tag: v1.2.90~116 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=9fa671aca7fd3d0e14a0ccede24f1303e20f0ad2;p=tigervnc.git Properly handle zero-length arguments git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@4969 3789f03b-4d11-0410-bbf8-ca57d06f2519 --- diff --git a/java/com/tigervnc/vncviewer/VncViewer.java b/java/com/tigervnc/vncviewer/VncViewer.java index acbdb7f2..d045e532 100644 --- a/java/com/tigervnc/vncviewer/VncViewer.java +++ b/java/com/tigervnc/vncviewer/VncViewer.java @@ -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]);