Fix string endings
All checks were successful
Compile / Compile (push) Successful in 1m24s

This commit is contained in:
leblane 2023-06-03 03:33:54 +03:00
parent 0ca946b897
commit fb289071e1

View file

@ -39,6 +39,7 @@ WatchFacePages::Weather::Weather(WatchyDisplay & display, WatchFeatures::WatchFe
void WatchFacePages::Weather::InitBoot()
{
memcpy(m_locationCity, DEFAULT_CITY_NAME, sizeof(DEFAULT_CITY_NAME));
m_locationCity[sizeof(DEFAULT_CITY_NAME)] = '\0';
}
void WatchFacePages::Weather::InitWake()
@ -307,6 +308,7 @@ void WatchFacePages::Weather::Resync()
}
memcpy(m_currentWeatherCondition, parts[0].c_str(), parts[0].length());
m_currentWeatherCondition[parts[0].length()] = '\0';
std::string temperature = parts[2].substr(0, parts[2].length() - 2);
m_currentTemperature = std::stoi(temperature);