diff options
author | Mattias Andrée <maandree@operamail.com> | 2013-08-27 23:17:51 +0200 |
---|---|---|
committer | Mattias Andrée <maandree@operamail.com> | 2013-08-27 23:17:51 +0200 |
commit | 9abaf63613b735e659e100443afc9d45a61b2adf (patch) | |
tree | 51da4c4bc6d8be5d9573e6be1179fa4122a87cac | |
parent | version common bugs (diff) | |
download | argparser-9abaf63613b735e659e100443afc9d45a61b2adf.tar.gz argparser-9abaf63613b735e659e100443afc9d45a61b2adf.tar.bz2 argparser-9abaf63613b735e659e100443afc9d45a61b2adf.tar.xz |
version common bug
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to '')
-rw-r--r-- | src/argparser/ArgParser.java | 7 |
1 files 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; } } |