Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b29217af authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "Fix failing ConfigTest"

parents 7dace4f8 917f8a23
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -109,9 +109,9 @@ int config_get_int(const config_t& config, const std::string& section,
  const entry_t* entry = entry_find(config, section, key);
  if (!entry) return def_value;

  size_t endptr;
  int ret = stoi(entry->value, &endptr, 0);
  return (endptr == entry->value.size()) ? ret : def_value;
  char* endptr;
  int ret = strtol(entry->value.c_str(), &endptr, 0);
  return (*endptr == '\0') ? ret : def_value;
}

bool config_get_bool(const config_t& config, const std::string& section,