зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1580352 - Avoid potential undefined behavior (left-shifting a negative integer) in pixman. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D45512 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
281ee9f628
Коммит
393c038cf9
|
@ -132,7 +132,7 @@ typedef pixman_fixed_16_16_t pixman_fixed_t;
|
|||
#define pixman_fixed_1_minus_e (pixman_fixed_1 - pixman_fixed_e)
|
||||
#define pixman_fixed_minus_1 (pixman_int_to_fixed(-1))
|
||||
#define pixman_fixed_to_int(f) ((int) ((f) >> 16))
|
||||
#define pixman_int_to_fixed(i) ((pixman_fixed_t) ((i) << 16))
|
||||
#define pixman_int_to_fixed(i) ((pixman_fixed_t) ((uint32_t)(i) << 16))
|
||||
#define pixman_fixed_to_double(f) (double) ((f) / (double) pixman_fixed_1)
|
||||
#define pixman_double_to_fixed(d) ((pixman_fixed_t) ((d) * 65536.0))
|
||||
#define pixman_fixed_frac(f) ((f) & pixman_fixed_1_minus_e)
|
||||
|
|
Загрузка…
Ссылка в новой задаче