office-gobmx/external/libebook/ubsan.patch
Stephan Bergmann ac05275755 Fix alpha computation (-fsanitize=undefined)
Change-Id: I3f50d3bb85bebdece692e069de73febc2ce63b47
2015-01-12 16:30:31 +01:00

11 lines
259 B
Diff

--- src/lib/LRFCollector.cpp
+++ src/lib/LRFCollector.cpp
@@ -50,7 +50,7 @@
{
assert(0 == bg.a);
- const double a = fg.a;
+ const double a = fg.a / 255.0;
const double r = (1 - a) * bg.r + a * fg.r;
const double g = (1 - a) * bg.g + a * fg.g;