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

Commit 77bb0f54 authored by Jakub Pawlowski's avatar Jakub Pawlowski Committed by android-build-merger
Browse files

Merge "Fix failing ConfigTest"

am: b29217af

Change-Id: I12576b3e14b08a4210f31f62a6e58752325eba95
parents f6d1f12f b29217af
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,