Unverified Commit 620817ac authored by fmeisel's avatar fmeisel Committed by GitHub

Update yaml_utils.cpp

# fix fme 2021-04-29 - sd=000000  leads to an error because check is just < or >, not <= or >
parent 6df172f3
......@@ -47,7 +47,7 @@ int GetInt32(const YAML::Node &node, const std::string &name)
int GetInt32(const YAML::Node &node, const std::string &name, std::optional<int> minValue, std::optional<int> maxValue)
{
int value = GetInt32(node, name);
if (minValue.has_value() && value < minValue)
if (minValue.has_value() && value <= minValue)
FieldError(name, "is too small");
if (maxValue.has_value() && value > maxValue)
FieldError(name, "is too big");
......@@ -120,7 +120,7 @@ int64_t GetInt64(const YAML::Node &node, const std::string &name, std::optional<
std::optional<int64_t> maxValue)
{
int64_t value = GetInt64(node, name);
if (minValue.has_value() && value < minValue)
if (minValue.has_value() && value <= minValue)
FieldError(name, "is too small");
if (maxValue.has_value() && value > maxValue)
FieldError(name, "is too big");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment