Fix alpha computation (-fsanitize=undefined)

Change-Id: I3f50d3bb85bebdece692e069de73febc2ce63b47
This commit is contained in:
Stephan Bergmann
2015-01-12 16:30:31 +01:00
parent e4fea6e67a
commit ac05275755
2 changed files with 16 additions and 1 deletions
+5 -1
View File
@@ -11,6 +11,10 @@ $(eval $(call gb_UnpackedTarball_UnpackedTarball,libebook))
$(eval $(call gb_UnpackedTarball_set_tarball,libebook,$(EBOOK_TARBALL)))
$(eval $(call gb_UnpackedTarball_set_patchlevel,libebook,1))
$(eval $(call gb_UnpackedTarball_set_patchlevel,libebook,0))
$(eval $(call gb_UnpackedTarball_add_patches,libebook, \
external/libebook/ubsan.patch \
))
# vim: set noet sw=4 ts=4:
+11
View File
@@ -0,0 +1,11 @@
--- 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;