mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-05-06 03:28:09 +02:00
wideint: Protect 64_32_div for non-HAVE_UINT16_T systems
Peter Clifton spotted that we failed to properly wrap _cairo_int64_32_div() for systems without a native 64 bit type.
This commit is contained in:
parent
c701d7813b
commit
f955a4cba7
1 changed files with 5 additions and 0 deletions
|
|
@ -187,7 +187,12 @@ _cairo_int64_divrem (cairo_int64_t num, cairo_int64_t den)
|
|||
static inline int32_t
|
||||
_cairo_int64_32_div (cairo_int64_t num, int32_t den)
|
||||
{
|
||||
#if !HAVE_UINT64_T
|
||||
return _cairo_int64_to_int32
|
||||
(_cairo_int64_divrem (num, _cairo_int32_to_int64 (den)).quo);
|
||||
#else
|
||||
return num / den;
|
||||
#endif
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue