From 0947ad9b9313864b6438b720628d7c68d3f89ad6 Mon Sep 17 00:00:00 2001 From: William Katz Date: Sun, 6 Jun 2021 16:53:28 -0700 Subject: [PATCH] :bug: bugged for loop --- include/log.hpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/log.hpp b/include/log.hpp index 2567ac8..15674eb 100644 --- a/include/log.hpp +++ b/include/log.hpp @@ -11,8 +11,9 @@ struct Log { if (data.size() == max_log_size) // If we hit the max size { - for (uint32_t i = 0; i < data.size() - 1; i--) // Make room at the back + for (uint32_t i = 1; i < data.size(); i++) // Make room at the back { + std::cout << i << '\n'; data[i - 1] = std::move(data[i]); // Shifts everything left } data[data.size() - 1] = std::move(t); // Place new in opened spot