From d69cdedd4a0163352db40711583e8289b5ea0fc9 Mon Sep 17 00:00:00 2001 From: tildearrow Date: Thu, 14 Sep 2023 02:41:11 -0500 Subject: [PATCH] FixedQueue: and again --- src/fixedQueue.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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];