Skip to content

Commit

Permalink
fixed: don't append % to an empty humidity label
Browse files Browse the repository at this point in the history
  • Loading branch information
spiff committed Nov 15, 2011
1 parent e5653b6 commit f472d3a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion xbmc/utils/Weather.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,10 @@ void CWeatherJob::SetFromProperties()
}
FormatTemperature(m_info.currentDewPoint,
strtol(window->GetProperty("Current.DewPoint").asString().c_str(),0,10));
m_info.currentHumidity.Format("%s%%",window->GetProperty("Current.Humidity").asString().c_str());
if (window->GetProperty("Current.Humidity").asString().empty())
m_info.currentHumidity.clear();
else
m_info.currentHumidity.Format("%s%%",window->GetProperty("Current.Humidity").asString().c_str());
m_info.location = window->GetProperty("Current.Location").asString();
for (int i=0;i<4;++i)
{
Expand Down

0 comments on commit f472d3a

Please sign in to comment.