From f2b6db584a13d03fabee8ae6ac0e73e81e52e24c Mon Sep 17 00:00:00 2001 From: Atlante45 Date: Mon, 3 Aug 2015 13:34:40 -0700 Subject: [PATCH] Fix list insert --- libraries/networking/src/udt/LossList.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libraries/networking/src/udt/LossList.cpp b/libraries/networking/src/udt/LossList.cpp index 488ac6610f..4cb182c2f7 100644 --- a/libraries/networking/src/udt/LossList.cpp +++ b/libraries/networking/src/udt/LossList.cpp @@ -100,7 +100,7 @@ bool LossList::remove(SequenceNumber seq) { } else { auto temp = it->second; it->second = seq - 1; - _lossList.insert(it, make_pair(seq + 1, temp)); + it = _lossList.insert(++it, make_pair(seq + 1, temp)); } _length -= 1; @@ -150,7 +150,7 @@ void LossList::remove(SequenceNumber start, SequenceNumber end) { _length -= seqlen(start, end); auto temp = it->second; it->second = start - 1; - _lossList.insert(it, make_pair(end + 1, temp)); + _lossList.insert(++it, make_pair(end + 1, temp)); } } }