From 9fa671aca7fd3d0e14a0ccede24f1303e20f0ad2 Mon Sep 17 00:00:00 2001 From: Brian Hinz Date: Sun, 26 Aug 2012 21:04:39 +0000 Subject: [PATCH] Properly handle zero-length arguments git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@4969 3789f03b-4d11-0410-bbf8-ca57d06f2519 --- java/com/tigervnc/vncviewer/VncViewer.java | 3 +++ 1 file changed, 3 insertions(+) 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]); -- 2.39.5