mirror of
https://github.com/webmproject/libwebp.git
synced 2024-12-26 05:38:22 +01:00
fix GetColorf() bug
We should only use the lower 8 bits, masking was missing. Change-Id: I3072168e100b242356ad57b5a73b7f4d6ebfbb9e
This commit is contained in:
parent
4338cd36fe
commit
de98732b04
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user