Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 7b53afec authored by Lloyd Pique's avatar Lloyd Pique
Browse files

libui: Fix clamping of uint32_t source values

It turned out that clamping was not working for conversions from
uint32_t values to int32_t values.

This adds a test to verify that conversion is handled correctly for that
case, along with correcting the logic for implementing the clamping.

The tests for the floating point source value case are also extended to
verify that source values near INT32_MAX and INT32_MIN are also handled
as correctly as possible, despite the seven bits of precision that are
lost.

Bug: 149495759
Test: atest Size_test
Change-Id: Iaa0560184e6c2dd0a9d288fff288fb159ee99f07
parent c993bf44
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment