diff options
Diffstat (limited to 'render/layout.c')
-rw-r--r-- | render/layout.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/render/layout.c b/render/layout.c index 372899856..fc0f22b98 100644 --- a/render/layout.c +++ b/render/layout.c @@ -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, |