| Index: src/objects.cc
|
| diff --git a/src/objects.cc b/src/objects.cc
|
| index 64f5a452d7c74ae961b6af3ec44a48d981f30fd1..9306eb9a4d16418ae2127ed7dbf5a274581ccaf4 100644
|
| --- a/src/objects.cc
|
| +++ b/src/objects.cc
|
| @@ -11628,7 +11628,7 @@ Object* ExternalPixelArray::SetValue(uint32_t index, Object* value) {
|
| clamped_value = 255;
|
| } else {
|
| // Other doubles are rounded to the nearest integer.
|
| - clamped_value = static_cast<uint8_t>(double_value + 0.5);
|
| + clamped_value = static_cast<uint8_t>(lrint(double_value));
|
| }
|
| } else {
|
| // Clamp undefined to zero (default). All other types have been
|
|
|