Skip to content

Commit

Permalink
Viewer: Prevent exception if '-' passed as arg
Browse files Browse the repository at this point in the history
  • Loading branch information
dcommander committed Aug 6, 2024
1 parent c15626c commit 4f19cdb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion java/com/turbovnc/vncviewer/VncViewer.java
Original file line number Diff line number Diff line change
Expand Up @@ -481,7 +481,7 @@ public VncViewer(String[] argv) {

if (argv[i].charAt(0) == '-') {
int index = 1;
if (argv[i].charAt(1) == '-' && argv[i].length() > 2)
if (argv[i].length() > 2 && argv[i].charAt(1) == '-')
index = 2;
if (i + 1 < argv.length) {
if (Configuration.setParam(argv[i].substring(index), argv[i + 1])) {
Expand Down

0 comments on commit 4f19cdb

Please sign in to comment.