From 9abaf63613b735e659e100443afc9d45a61b2adf Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Tue, 27 Aug 2013 23:17:51 +0200 Subject: version common bug MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- src/argparser/ArgParser.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/argparser/ArgParser.java b/src/argparser/ArgParser.java index f7d2b9c..43d5a83 100644 --- a/src/argparser/ArgParser.java +++ b/src/argparser/ArgParser.java @@ -1208,19 +1208,20 @@ public class ArgParser else if (arg.contains("=")) { String arg_opt = arg.substring(0, arg.indexOf('=')); Option arg_opt_opt = this.optmap.get(arg_opt); + String value = arg.substring(arg.indexOf('=') + 1) if ((arg_opt_opt != null) && (arg_opt_opt instanceof Argumented)) { optqueue.add(arg_opt); - argqueue.add(arg.substring(arg.indexOf('=') + 1)); + argqueue.add(value); if (arg_opt_opt instanceof Variadic) { dashed = true; arg_opt_opt.trigger(arg_opt); } else - ((Argumented)arg_opt_opt).trigger(arg_opt, arg.substring(arg.indexOf('=') + 1)); + ((Argumented)arg_opt_opt).trigger(arg_opt, value); } else { if (++this.unrecognisedCount <= 5) - this.println(this.program + ": warning: unrecognised option " + arg, true); + this.println(this.program + ": warning: unrecognised option " + arg_opt, true); rc = false; } } -- cgit v1.2.3-70-g09d2