fix GetColorf() bug

We should only use the lower 8 bits, masking was missing.

Change-Id: I3072168e100b242356ad57b5a73b7f4d6ebfbb9e
This commit is contained in:
Pascal Massimino 2018-07-06 21:25:41 -07:00
parent 4338cd36fe
commit de98732b04

View File

@ -286,7 +286,7 @@ static void PrintString(const char* const text) {
}
static float GetColorf(uint32_t color, int shift) {
return (color >> shift) / 255.f;
return ((color >> shift) & 0xff) / 255.f;
}
static void DrawCheckerBoard(void) {