[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

@ -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;
} }

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);