From 8dadf02c4fc01de1c0330f277d2cb6023b06cee1 Mon Sep 17 00:00:00 2001 From: Lee Clagett Date: Wed, 23 Nov 2016 16:42:01 -0500 Subject: [PATCH] Fixed undefined behavior in TestDB --- tests/unit_tests/hardfork.cpp | 4 ++-- 1 file 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() {}