From 1b9f363225af2f3051baecb5711c5c9c76370d78 Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Tue, 3 Jan 2017 23:17:08 +0000 Subject: [PATCH] Fix bug relying on undefined arg evaluation order. --- src/selection.hh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/selection.hh b/src/selection.hh index edf8e601..fa0da47a 100644 --- a/src/selection.hh +++ b/src/selection.hh @@ -101,7 +101,8 @@ struct SelectionList SelectionList& operator=(Vector list) { - set(std::move(list), list.size()-1); + const size_t main_index = list.size()-1; + set(std::move(list), main_index); return *this; }