Skip to content

Commit f751cb2

Browse files
authored
Merge pull request #473 from ATrivialAtomic/assign-check-val-fix
vcomp/cmpto_j2k.cpp - Update val comparison to DBL_MAX
2 parents 2ee732a + df49a6f commit f751cb2

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/video_compress/cmpto_j2k.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@
5252
#endif // HAVE_CONFIG_H
5353

5454
#include <cassert>
55+
#include <cfloat>
5556
#include <cmath>
5657
#include <climits>
5758
#include <condition_variable>
@@ -733,7 +734,7 @@ static void usage(bool full) {
733734
#define ASSIGN_CHECK_VAL(var, str, minval) \
734735
do { \
735736
const double val = unit_evaluate_dbl(str, false, nullptr); \
736-
if (std::isnan(val) || val < (minval) || val > UINT_MAX) { \
737+
if (std::isnan(val) || val < (minval) || val > DBL_MAX) { \
737738
LOG(LOG_LEVEL_ERROR) \
738739
<< "[J2K] Wrong value " << (str) \
739740
<< " for " #var "! Value must be >= " << (minval) \

0 commit comments

Comments
 (0)