Skip to content

Commit

Permalink
fix entry assignment from bdecode_node and lazy_entry
Browse files Browse the repository at this point in the history
  • Loading branch information
arvidn committed Jul 21, 2019
1 parent 057c668 commit 71c9809
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/entry.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -359,6 +359,7 @@ namespace {
// convert a bdecode_node into an old school entry
entry& entry::operator=(bdecode_node const& e) &
{
destruct();
switch (e.type())
{
case bdecode_node::string_t:
Expand Down Expand Up @@ -388,7 +389,6 @@ namespace {
break;
}
case bdecode_node::none_t:
destruct();
break;
}
return *this;
Expand All @@ -398,6 +398,7 @@ namespace {
// convert a lazy_entry into an old school entry
entry& entry::operator=(lazy_entry const& e) &
{
destruct();
switch (e.type())
{
case lazy_entry::string_t:
Expand Down Expand Up @@ -427,7 +428,6 @@ namespace {
break;
}
case lazy_entry::none_t:
destruct();
break;
}
return *this;
Expand Down

0 comments on commit 71c9809

Please sign in to comment.