Skip to content

Commit 1735e6a

Browse files
committed
vcomp/cmpto_j2k: ASSIGN_CHECK_VAL: ret on not-num
If some non-number is passed as a value, do not print the range message - unit_evaluate_dbl already prints error and returns NAN.
1 parent 1764e53 commit 1735e6a

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/video_compress/cmpto_j2k.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -734,7 +734,10 @@ static void usage(bool full) {
734734
#define ASSIGN_CHECK_VAL(var, str, minval) \
735735
do { \
736736
const double val = unit_evaluate_dbl(str, false, nullptr); \
737-
if (std::isnan(val) || val < (minval) || val > DBL_MAX) { \
737+
if (std::isnan(val)) { \
738+
return nullptr; \
739+
} \
740+
if (val < (minval) || val > DBL_MAX) { \
738741
LOG(LOG_LEVEL_ERROR) \
739742
<< "[J2K] Wrong value " << (str) \
740743
<< " for " #var "! Value must be >= " << (minval) \

0 commit comments

Comments
 (0)