diff options
author | John Wiegley <johnw@newartisans.com> | 2004-08-17 16:46:24 -0400 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2004-08-17 16:46:24 -0400 |
commit | de39574e89cc72aef157d10d451fac1f78af37c6 (patch) | |
tree | 4debe51b2109378702e02d16bf81186474f549aa /main.cc | |
parent | bbcb49fed27ea7d2052724fbee79f42c9bc744bc (diff) | |
download | fork-ledger-de39574e89cc72aef157d10d451fac1f78af37c6.tar.gz fork-ledger-de39574e89cc72aef157d10d451fac1f78af37c6.tar.bz2 fork-ledger-de39574e89cc72aef157d10d451fac1f78af37c6.zip |
fixed a memory corruption bug stemming from not using an input iterator
Diffstat (limited to 'main.cc')
-rw-r--r-- | main.cc | 5 |
1 files changed, 2 insertions, 3 deletions
@@ -14,6 +14,7 @@ using namespace ledger; #include <fstream> #include <memory> #include <algorithm> +#include <iterator> #include <string> #include <cstdlib> #include <cstring> @@ -127,11 +128,9 @@ int main(int argc, char * argv[], char * envp[]) journal->sources.pop_front(); // remove cache_file strings_list exceptions; -#if 0 std::set_difference(journal->sources.begin(), journal->sources.end(), config->files.begin(), config->files.end(), - exceptions.begin()); -#endif + std::back_insert_iterator<strings_list>(exceptions)); if (entry_count == 0 || exceptions.size() > 0) { journal.reset(new journal_t); |