From 8ee1bc1ed971dedc6e8f7b15946aea5e05edcf41 Mon Sep 17 00:00:00 2001 From: Diavolo Date: Sun, 26 Jun 2022 20:20:11 +0200 Subject: [PATCH] [Logger] Fix output by g_log_list & log_list --- src/Components/Modules/Logger.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Components/Modules/Logger.cpp b/src/Components/Modules/Logger.cpp index d04a5d31..2a25e37e 100644 --- a/src/Components/Modules/Logger.cpp +++ b/src/Components/Modules/Logger.cpp @@ -265,7 +265,7 @@ namespace Components { if (params->size() < 2) return; - int num = atoi(params->get(1)); + const auto num = atoi(params->get(1)); if (Utils::String::VA("%i", num) == std::string(params->get(1)) && static_cast(num) < Logger::LoggingAddresses[0].size()) { auto addr = Logger::LoggingAddresses[0].begin() + num; @@ -296,7 +296,7 @@ namespace Components for (unsigned int i = 0; i < Logger::LoggingAddresses[0].size(); ++i) { - Logger::Print("{}: {}\n", i, Logger::LoggingAddresses[0][i].getCString()); + Logger::Print("#{:03d}: {}\n", i, Logger::LoggingAddresses[0][i].getCString()); } }); @@ -316,7 +316,7 @@ namespace Components { if (params->size() < 2) return; - int num = atoi(params->get(1)); + const auto num = std::atoi(params->get(1)); if (Utils::String::VA("%i", num) == std::string(params->get(1)) && static_cast(num) < Logger::LoggingAddresses[1].size()) { const auto addr = Logger::LoggingAddresses[1].begin() + num; @@ -347,7 +347,7 @@ namespace Components for (std::size_t i = 0; i < Logger::LoggingAddresses[1].size(); ++i) { - Logger::Print("{}: {}\n", i, Logger::LoggingAddresses[1][i].getCString()); + Logger::Print("#{:03d}: {}\n", i, Logger::LoggingAddresses[1][i].getCString()); } }); }