From 9bbbdccc89258bc95207ae1307b7b250a0b94d76 Mon Sep 17 00:00:00 2001 From: fechen123 <19713402+fechen123@users.noreply.github.com> Date: Wed, 18 Oct 2017 19:46:29 -0400 Subject: [PATCH] update tcd.c to fix issue #1033 --- src/lib/openjp2/tcd.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/lib/openjp2/tcd.c b/src/lib/openjp2/tcd.c index ede3107b..7380c4bd 100644 --- a/src/lib/openjp2/tcd.c +++ b/src/lib/openjp2/tcd.c @@ -586,8 +586,9 @@ OPJ_BOOL opj_tcd_rateallocate(opj_tcd_t *tcd, if (distoachieved < distotarget) { hi = thresh; - if (distoachieved > DBL_EPSILON) - stable_thresh = thresh; + if (distoachieved > DBL_EPSILON) { + stable_thresh = thresh; + } continue; } else { lo = thresh; @@ -599,8 +600,9 @@ OPJ_BOOL opj_tcd_rateallocate(opj_tcd_t *tcd, if (distoachieved < distotarget) { hi = thresh; - if (distoachieved > DBL_EPSILON) - stable_thresh = thresh; + if (distoachieved > DBL_EPSILON) { + stable_thresh = thresh; + } continue; } lo = thresh;