diff --git a/src/fixedQueue.h b/src/fixedQueue.h index aa76da33d..9866fe732 100644 --- a/src/fixedQueue.h +++ b/src/fixedQueue.h @@ -76,7 +76,7 @@ template bool FixedQueue::erase(size_t pos) return pop_back(); } - for (size_t i=pos, p=(readPos+pos)%items, p1=(readPos+pos+1)%items; i<=curSize; i++) { + for (size_t i=pos+1, p=(readPos+pos)%items, p1=(readPos+pos+1)%items; i=items) p-=items; if (p1>=items) p1-=items; data[p]=data[p1];