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

Commit 917f8a23 authored by Jakub Pawlowski's avatar Jakub Pawlowski
Browse files

Fix failing ConfigTest

When running in cloud, different version of STL library is used. It
throws exceptions and make tests fail.

Bug: 67963594
Test: ConfigTest
Change-Id: Ie53b82e5d670f44a2460880c32dd9102d1caad7d
parent 776fb3df
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,