From cce929ec66a92dc7481fc36f1a0b796c0ba75a09 Mon Sep 17 00:00:00 2001 From: modeco80 Date: Mon, 21 Aug 2023 21:47:39 -0400 Subject: [PATCH] brugh --- src/main.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index 446e981..49e5818 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -68,7 +68,7 @@ namespace { unsigned ln = 1; auto Color(int n, const std::string& s) { - return "\33[38;5;" + std::to_string(n) + 'm' + s + "\33[m"; + return std::format("\33[38;5;{}m{}\33[m", n, s); } auto Line(int l) { @@ -90,8 +90,8 @@ struct BruteThreadState { } void BruteForce(char prefix) { - for(std::uint32_t i = 2; i < code_length; ++i) { - std::string test_buffer(i, 'a'); + //for(std::uint32_t i = 8; i <= code_length; ++i) { + std::string test_buffer(code_length, 'a'); test_buffer[0] = prefix; // test all possible combinations @@ -106,7 +106,7 @@ struct BruteThreadState { if(!NextCode(test_buffer, 1)) break; } - } + //} } private: