From cf4fb7d0e36261172e5831fd570d46828b035a65 Mon Sep 17 00:00:00 2001 From: Matthijs Kooijman Date: Tue, 8 Apr 2014 12:07:20 +0200 Subject: [PATCH] Don't re-parse arguments to --preferences-file Previously, the argument to --preferences-file would be interpreted as a filename, but then also checked as an option as well (in the next loop iteration). This didn't really matter in practice (unless you would be using a file called "--preferences-file"), but better skip the argument anyway. --- app/src/processing/app/Base.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/src/processing/app/Base.java b/app/src/processing/app/Base.java index 0a5056554..92b417713 100644 --- a/app/src/processing/app/Base.java +++ b/app/src/processing/app/Base.java @@ -147,8 +147,10 @@ public class Base { // when no parameter was specified to an option. Later, Base() will // then show an error for these. for (int i = 0; i < args.length - 1; i++) { - if (args[i].equals("--preferences-file")) - preferencesFile = new File(args[i + 1]); + if (args[i].equals("--preferences-file")) { + ++i; + preferencesFile = new File(args[i]); + } } // run static initialization that grabs all the prefs