aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRiccardo Spagni <ric@spagni.net>2016-11-24 13:01:05 +0200
committerRiccardo Spagni <ric@spagni.net>2016-11-24 13:01:05 +0200
commit4248d5131c81bcc031a78c76ecd480345d54cd90 (patch)
treeeff020455bdda07d3121c792e9a2f306ac21c706
parentMerge pull request #1369 (diff)
parentFixed undefined behavior in TestDB (diff)
downloadmonero-4248d5131c81bcc031a78c76ecd480345d54cd90.tar.xz
Merge pull request #1371
8dadf02 Fixed undefined behavior in TestDB (Lee Clagett)
-rw-r--r--tests/unit_tests/hardfork.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/unit_tests/hardfork.cpp b/tests/unit_tests/hardfork.cpp
index 7b4874811..be2885f45 100644
--- a/tests/unit_tests/hardfork.cpp
+++ b/tests/unit_tests/hardfork.cpp
@@ -117,7 +117,7 @@ public:
blocks.push_back(blk);
}
virtual block get_block_from_height(const uint64_t& height) const {
- return blocks[height];
+ return blocks.at(height);
}
virtual void set_hard_fork_version(uint64_t height, uint8_t version) {
if (versions.size() <= height)
@@ -125,7 +125,7 @@ public:
versions[height] = version;
}
virtual uint8_t get_hard_fork_version(uint64_t height) const {
- return versions[height];
+ return versions.at(height);
}
virtual void check_hard_fork_info() {}