Fix bug relying on undefined arg evaluation order.

This commit is contained in:
Maxime Coste 2017-01-03 23:17:08 +00:00
parent 4295736c97
commit 1b9f363225

View File

@ -101,7 +101,8 @@ struct SelectionList
SelectionList& operator=(Vector<Selection> list)
{
set(std::move(list), list.size()-1);
const size_t main_index = list.size()-1;
set(std::move(list), main_index);
return *this;
}