manual fix of buffer

This commit is contained in:
rusefillc 2021-12-03 10:08:48 -05:00
parent 87046b903a
commit 1ee878d49d
1 changed files with 1 additions and 1 deletions

View File

@ -71,7 +71,7 @@ template<typename T, size_t maxSize>
void cyclic_buffer<T, maxSize>::add(T value) {
// Too lazy to make this thread safe, but at the very least let's never let currentIndex
// become invalid. And yes I did see a crash due to an overrun here.
uint16_t idx = currentIndex;
volatile int idx = currentIndex;
((T &)elements[idx]) = value;