patches/webkit-10-pow.diff
author jurikm
Sun, 12 Feb 2012 14:04:10 +0000
changeset 8245 383896da4129
parent 2650 901d2088a9b2
permissions -rw-r--r--
SFEsauerbraten.spec: add IPS package name

diff -r 1eee1a959948 WebCore/platform/graphics/filters/FEComponentTransfer.cpp
--- a/WebCore/platform/graphics/filters/FEComponentTransfer.cpp	Mon Mar 01 15:25:21 2010 +0800
+++ b/WebCore/platform/graphics/filters/FEComponentTransfer.cpp	Mon Mar 01 15:36:22 2010 +0800
@@ -142,7 +142,7 @@
 {
     for (unsigned i = 0; i < 256; ++i) {
         double exponent = transferFunction.exponent; // RCVT doesn't like passing a double and a float to pow, so promote this to double
-        double val = 255.0 * (transferFunction.amplitude * pow((i / 255.0), exponent) + transferFunction.offset);
+        double val = 255.0 * (transferFunction.amplitude * pow(double(i / 255.0), double(transferFunction.exponent)) + transferFunction.offset);
         val = std::max(0.0, std::min(255.0, val));
         values[i] = static_cast<unsigned char>(val);
     }