From db440a2a58a9f783322ffc528fe50e832f5ae50c Mon Sep 17 00:00:00 2001 From: sheepandshepherd Date: Fri, 10 Jul 2015 21:33:44 +0200 Subject: Fix List::move_before for front and back elements --- core/list.h | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'core/list.h') diff --git a/core/list.h b/core/list.h index 6deb150ef6..018abca940 100644 --- a/core/list.h +++ b/core/list.h @@ -518,10 +518,16 @@ public: if (value->prev_ptr) { value->prev_ptr->next_ptr = value->next_ptr; - }; + } + else { + _data->first = value->next_ptr; + } if (value->next_ptr) { value->next_ptr->prev_ptr = value->prev_ptr; - }; + } + else { + _data->last = value->prev_ptr; + } value->next_ptr = where; if (!where) { -- cgit v1.2.3