Fix possible division by 0 in radius calculation

This commit is contained in:
Nikos Tsipinakis 2020-07-18 22:37:51 +03:00
parent 9db8b76473
commit c01f81b692

View File

@ -412,6 +412,9 @@ static int layout_get_height(struct colored_layout *cl)
*/
static int frame_internal_radius (int r, int w, int h)
{
if (r == 0 || w == 0 || h == 0)
return 0;
// Integer precision scaler, using 1/4 of int size
const int s = 2 << (8 * sizeof(int) / 4);