From 7f48220e127ac7e7a83a9b1826e52bc75c2f2288 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Fri, 8 Aug 2014 11:11:12 +0200 Subject: m MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- src/gamma.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gamma.c b/src/gamma.c index 660c013..843403d 100644 --- a/src/gamma.c +++ b/src/gamma.c @@ -64,7 +64,7 @@ void gamma_generate(size_t stops, uint16_t* restrict ramp, double gamma, { y_ = (double)i / (double)stops; y_ = pow(y_, gamma_) * diff + brightness; - y = (int32_t)(y * 0xFFFF); + y = (int32_t)(y_ * 0xFFFF); if (y < 0x0000) y = 0x0000; if (y > 0xFFFF) y = 0xFFFF; ramp[i] = (uint16_t)y; -- cgit v1.2.3-70-g09d2