From 7fcd0331becd5c58cb7cf47abc072fd343c34086 Mon Sep 17 00:00:00 2001 From: momo5502 Date: Sat, 29 Apr 2017 00:18:51 +0200 Subject: [PATCH] [Colors] Fix color sign --- src/Components/Modules/Auth.cpp | 11 +++++------ src/Components/Modules/Colors.cpp | 4 ++-- src/Components/Modules/Colors.hpp | 2 +- 3 files changed, 8 insertions(+), 9 deletions(-) diff --git a/src/Components/Modules/Auth.cpp b/src/Components/Modules/Auth.cpp index 7fc5cdda..572a80dc 100644 --- a/src/Components/Modules/Auth.cpp +++ b/src/Components/Modules/Auth.cpp @@ -313,7 +313,7 @@ namespace Components Command::Execute("openmenu security_increase_popmenu", true); // Start thread - Auth::TokenContainer.thread = std::thread([&level] () + Auth::TokenContainer.thread = std::thread([&level]() { Auth::TokenContainer.generating = true; Auth::TokenContainer.hashes = 0; @@ -388,8 +388,7 @@ namespace Components // Allow canceling that shit if (cancel && *cancel) return; - } - while (level < zeroBits); + } while (level < zeroBits); token = computeToken; } @@ -422,14 +421,14 @@ namespace Components Utils::Hook::Set(0x4D0D60, 0xC301B0); // Guid command - Command::Add("guid", [] (Command::Params*) + Command::Add("guid", [](Command::Params*) { Logger::Print("Your guid: %llX\n", Steam::SteamUser()->GetSteamID().bits); }); if (!Dedicated::IsEnabled() && !ZoneBuilder::IsEnabled()) { - Command::Add("securityLevel", [] (Command::Params* params) + Command::Add("securityLevel", [](Command::Params* params) { if (params->length() < 2) { @@ -448,7 +447,7 @@ namespace Components }); } - UIScript::Add("security_increase_cancel", [] (UIScript::Token) + UIScript::Add("security_increase_cancel", [](UIScript::Token) { Auth::TokenContainer.cancel = true; Logger::Print("Token incrementation process canceled!\n"); diff --git a/src/Components/Modules/Colors.cpp b/src/Components/Modules/Colors.cpp index dc29d26a..78440758 100644 --- a/src/Components/Modules/Colors.cpp +++ b/src/Components/Modules/Colors.cpp @@ -139,9 +139,9 @@ namespace Components return index; } - unsigned int Colors::ColorIndex(unsigned char index) + unsigned int Colors::ColorIndex(char index) { - unsigned int result = index - '0'; + char result = index - '0'; if (result >= Colors::ColorTable.size() || result < 0) result = 7; return result; } diff --git a/src/Components/Modules/Colors.hpp b/src/Components/Modules/Colors.hpp index 3ac61165..8bc95333 100644 --- a/src/Components/Modules/Colors.hpp +++ b/src/Components/Modules/Colors.hpp @@ -33,7 +33,7 @@ namespace Components static char* GetClientName(int localClientNum, int index, char *buf, size_t size); static void PatchColorLimit(char limit); - static unsigned int ColorIndex(unsigned char); + static unsigned int ColorIndex(char index); static void LookupColor(DWORD* color, char index); static void LookupColorStub(); static char* CleanStrStub(char* string);