summaryrefslogtreecommitdiff
path: root/src/iterators.h
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2009-03-07 15:04:32 -0400
committerJohn Wiegley <johnw@newartisans.com>2009-03-07 15:04:32 -0400
commitec382f54b7cffce3433896b331ef36c52de24b08 (patch)
tree15f27eeb6f53a7158ba36aa596932ac892fa35f1 /src/iterators.h
parent79515680cf4848bab12c05f4e9c753ea4fbbf440 (diff)
downloadfork-ledger-ec382f54b7cffce3433896b331ef36c52de24b08.tar.gz
fork-ledger-ec382f54b7cffce3433896b331ef36c52de24b08.tar.bz2
fork-ledger-ec382f54b7cffce3433896b331ef36c52de24b08.zip
Fixed a reference to uninitialized memory
This was only found with _GLIBCXX_DEBUG=1 *and* coverage analysis (-fprofile-arcs -ftest-coverage).
Diffstat (limited to 'src/iterators.h')
-rw-r--r--src/iterators.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/iterators.h b/src/iterators.h
index 7ea78118..67293c5c 100644
--- a/src/iterators.h
+++ b/src/iterators.h
@@ -99,7 +99,7 @@ public:
}
virtual post_t * operator()() {
- if (posts_i == posts_end || posts_uninitialized)
+ if (posts_uninitialized || posts_i == posts_end)
return NULL;
return *posts_i++;
}