summaryrefslogtreecommitdiffstats
path: root/java
diff options
context:
space:
mode:
authorBrian Hinz <bphinz@users.sourceforge.net>2012-08-26 21:04:39 +0000
committerBrian Hinz <bphinz@users.sourceforge.net>2012-08-26 21:04:39 +0000
commit9fa671aca7fd3d0e14a0ccede24f1303e20f0ad2 (patch)
tree728c5e897ad11684c4cb11fa47fb39b9c8ed2ad2 /java
parentcb2075260dbfe5a6ae970e6b012f51c666ebf94a (diff)
downloadtigervnc-9fa671aca7fd3d0e14a0ccede24f1303e20f0ad2.tar.gz
tigervnc-9fa671aca7fd3d0e14a0ccede24f1303e20f0ad2.zip
Properly handle zero-length arguments
git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@4969 3789f03b-4d11-0410-bbf8-ca57d06f2519
Diffstat (limited to 'java')
-rw-r--r--java/com/tigervnc/vncviewer/VncViewer.java3
1 files changed, 3 insertions, 0 deletions
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]);