Fix unlink_after for forward_link where the wrong link would get it's next link cleared.

This commit is contained in:
John Wellbelove 2016-06-22 19:06:51 +01:00
parent fa4121de85
commit 8b662c4925

View File

@ -289,13 +289,13 @@ namespace etl
{
if (node.etl_next != nullptr)
{
TLink* old_next = node.etl_next;
node.etl_next = old_next->etl_next;
TLink* unlinked_node = node.etl_next;
node.etl_next = unlinked_node->etl_next;
if ((int(TLink::OPTION) == etl::link_option::AUTO) ||
(int(TLink::OPTION) == etl::link_option::CHECKED))
{
old_next.clear();
unlinked_node->clear();
}
}
}