[Colors] Fix color sign

This commit is contained in:
momo5502 2017-04-29 00:18:51 +02:00
parent 93e65b4767
commit 7fcd0331be
3 changed files with 8 additions and 9 deletions

View File

@ -313,7 +313,7 @@ namespace Components
Command::Execute("openmenu security_increase_popmenu", true); Command::Execute("openmenu security_increase_popmenu", true);
// Start thread // Start thread
Auth::TokenContainer.thread = std::thread([&level] () Auth::TokenContainer.thread = std::thread([&level]()
{ {
Auth::TokenContainer.generating = true; Auth::TokenContainer.generating = true;
Auth::TokenContainer.hashes = 0; Auth::TokenContainer.hashes = 0;
@ -388,8 +388,7 @@ namespace Components
// Allow canceling that shit // Allow canceling that shit
if (cancel && *cancel) return; if (cancel && *cancel) return;
} } while (level < zeroBits);
while (level < zeroBits);
token = computeToken; token = computeToken;
} }
@ -422,14 +421,14 @@ namespace Components
Utils::Hook::Set<DWORD>(0x4D0D60, 0xC301B0); Utils::Hook::Set<DWORD>(0x4D0D60, 0xC301B0);
// Guid command // Guid command
Command::Add("guid", [] (Command::Params*) Command::Add("guid", [](Command::Params*)
{ {
Logger::Print("Your guid: %llX\n", Steam::SteamUser()->GetSteamID().bits); Logger::Print("Your guid: %llX\n", Steam::SteamUser()->GetSteamID().bits);
}); });
if (!Dedicated::IsEnabled() && !ZoneBuilder::IsEnabled()) if (!Dedicated::IsEnabled() && !ZoneBuilder::IsEnabled())
{ {
Command::Add("securityLevel", [] (Command::Params* params) Command::Add("securityLevel", [](Command::Params* params)
{ {
if (params->length() < 2) 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; Auth::TokenContainer.cancel = true;
Logger::Print("Token incrementation process canceled!\n"); Logger::Print("Token incrementation process canceled!\n");

View File

@ -139,9 +139,9 @@ namespace Components
return index; 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; if (result >= Colors::ColorTable.size() || result < 0) result = 7;
return result; return result;
} }

View File

@ -33,7 +33,7 @@ namespace Components
static char* GetClientName(int localClientNum, int index, char *buf, size_t size); static char* GetClientName(int localClientNum, int index, char *buf, size_t size);
static void PatchColorLimit(char limit); 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 LookupColor(DWORD* color, char index);
static void LookupColorStub(); static void LookupColorStub();
static char* CleanStrStub(char* string); static char* CleanStrStub(char* string);