From ed9005690a77a9bdfe334f79f6df0c421975161d Mon Sep 17 00:00:00 2001 From: Charles Pigott Date: Tue, 26 Mar 2019 23:57:54 +0000 Subject: [PATCH] Fix #7421: Don't (directly) dereference std::vector::end() in SmallMap --- src/core/smallmap_type.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/core/smallmap_type.hpp b/src/core/smallmap_type.hpp index d7a9a38322..5eb94e23a2 100644 --- a/src/core/smallmap_type.hpp +++ b/src/core/smallmap_type.hpp @@ -79,12 +79,12 @@ struct SmallMap : std::vector > { inline const Pair *End() const { - return &*std::vector::end(); + return std::vector::data() + std::vector::size(); } inline Pair *End() { - return &*std::vector::end(); + return std::vector::data() + std::vector::size(); }