mirror of
https://github.com/netsurf-browser/netsurf
synced 2024-12-01 02:26:58 +03:00
Fix fixed point percentage macro not to overflow. Thanks to jmb and vince.
svn path=/trunk/netsurf/; revision=11702
This commit is contained in:
parent
7d03e1f969
commit
bbdb7cd440
@ -59,9 +59,7 @@
|
||||
#define AUTO INT_MIN
|
||||
|
||||
/* Fixed point value percentage of an integer, to an integer */
|
||||
#define FPCT_OF_INT_TOINT(a, b) (a < 0) ? \
|
||||
(FIXTOFLT(a) * b) / 100 : \
|
||||
FIXTOINT(FDIVI(FMULI(a, b), 100))
|
||||
#define FPCT_OF_INT_TOINT(a, b) FIXTOINT(FMULI(FDIVI(a, 100), b))
|
||||
|
||||
|
||||
static bool layout_block_context(struct box *block, int viewport_height,
|
||||
|
Loading…
Reference in New Issue
Block a user