diff --git a/src/engine/fixedQueue.h b/src/engine/fixedQueue.h index afcf8afca..ad43f160d 100644 --- a/src/engine/fixedQueue.h +++ b/src/engine/fixedQueue.h @@ -112,12 +112,12 @@ template bool FixedQueue::push_front(const T logW("stack overflow!"); return false; } - data[readPos]=item; if (readPos>0) { readPos--; } else { readPos=items-1; } + data[readPos]=item; return true; }