From 2f9d1d3eef2dcf31ad813357dc8f6754275f340d Mon Sep 17 00:00:00 2001 From: tildearrow Date: Thu, 14 Sep 2023 02:22:45 -0500 Subject: [PATCH] FixedQueue: I screwed erase up --- src/fixedQueue.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/fixedQueue.h b/src/fixedQueue.h index 91ebeea36..aa76da33d 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=0, p=(readPos+pos)%items, p1=(readPos+pos+1)%items; i<=curSize; i++) { + for (size_t i=pos, p=(readPos+pos)%items, p1=(readPos+pos+1)%items; i<=curSize; i++) { if (p>=items) p-=items; if (p1>=items) p1-=items; data[p]=data[p1];