If percentage is negative, resort to floating point.

svn path=/trunk/netsurf/; revision=11700
This commit is contained in:
Michael Drake 2011-02-16 17:14:47 +00:00
parent 8912285839
commit 06e6ec4eb1

View File

@ -59,7 +59,9 @@
#define AUTO INT_MIN
/* Fixed point value percentage of an integer, to an integer */
#define FPCT_OF_INT_TOINT(a, b) FIXTOINT(FDIVI(FMULI(a, b), 100))
#define FPCT_OF_INT_TOINT(a, b) (a < 0) ? \
(FIXTOFLT(a) * b) / 100 : \
FIXTOINT(FDIVI(FMULI(a, b), 100))
static bool layout_block_context(struct box *block, int viewport_height,