Skip to content

Commit

Permalink
Fix dangling pointer
Browse files Browse the repository at this point in the history
  • Loading branch information
kataklinger committed Mar 3, 2024
1 parent 3ebc1fa commit 31d38cc
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/inc/configuration.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,7 @@ namespace details {

public:
inline constexpr explicit ptype_base(Built const* current)
: current_{current} {
: current_{*current} {
}

protected:
Expand All @@ -396,11 +396,11 @@ namespace details {
Derived,
Appended,
typename entry_map_t::unlocked_t>{
std::forward<Appended>(section), *current_};
std::forward<Appended>(section), current_};
}

private:
Built const* current_;
Built current_;
};

template<typename Built, typename = void>
Expand Down

0 comments on commit 31d38cc

Please sign in to comment.