diff options
author | John Wiegley <johnw@newartisans.com> | 2005-07-15 00:55:45 +0000 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2008-04-13 02:41:16 -0400 |
commit | c29eed174de09e1477ee31c87cf3e2f2dd445b9e (patch) | |
tree | aed4231f2d90e948db1d224e940033f1a76c801b | |
parent | f8610dbfd7155d188daa999ac712bfedfed309bc (diff) | |
download | fork-ledger-c29eed174de09e1477ee31c87cf3e2f2dd445b9e.tar.gz fork-ledger-c29eed174de09e1477ee31c87cf3e2f2dd445b9e.tar.bz2 fork-ledger-c29eed174de09e1477ee31c87cf3e2f2dd445b9e.zip |
(process_options): Test the "i" and "arg" variables thoroughly before
making use of either one of them.
-rw-r--r-- | config.cc | 9 |
1 files changed, 5 insertions, 4 deletions
@@ -182,10 +182,11 @@ void config_t::process_options(const std::string& command, if (*i == "--") break; - regexps_to_predicate(*this, command, arg, i++, true, - (command == "b" && ! show_subtotal && - display_predicate.empty())); - if (i != args_end) + if (i != arg) + regexps_to_predicate(*this, command, arg, i, true, + (command == "b" && ! show_subtotal && + display_predicate.empty())); + if (i != args_end && ++i != args_end) regexps_to_predicate(*this, command, i, args_end); } |