From db44173e3b6dec5a4407ac13fd6d0efd6bc4f625 Mon Sep 17 00:00:00 2001 From: Emeric Date: Wed, 8 Aug 2018 12:50:25 +0200 Subject: [PATCH] Fix arithmetic exception in hb_set_anamorphic_size2() when displaying preview --- libhb/hb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libhb/hb.c b/libhb/hb.c index f16e72574..a137e4bbb 100644 --- a/libhb/hb.c +++ b/libhb/hb.c @@ -789,7 +789,7 @@ void hb_set_anamorphic_size2(hb_geometry_t *src_geo, int cropped_width = src_geo->width - geo->crop[2] - geo->crop[3]; int cropped_height = src_geo->height - geo->crop[0] - geo->crop[1]; double storage_aspect = (double)cropped_width / cropped_height; - int mod = geo->modulus ? EVEN(geo->modulus) : 2; + int mod = (geo->modulus > 0) ? EVEN(geo->modulus) : 2; // Sanitize PAR if (geo->geometry.par.num == 0 || geo->geometry.par.den == 0) -- 2.40.0