diff options
Diffstat (limited to 'include/olm')
-rw-r--r-- | include/olm/list.hh | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/include/olm/list.hh b/include/olm/list.hh index e4bf951..6906c87 100644 --- a/include/olm/list.hh +++ b/include/olm/list.hh @@ -69,10 +69,10 @@ public: } else if (pos == _end) { --pos; } - T * tmp = pos; - while (tmp != _end - 1) { - *(tmp + 1) = *tmp; - ++tmp; + T * tmp = _end - 1; + while (tmp != pos) { + *tmp = *(tmp - 1); + --tmp; } return pos; } |