Skip to content
Browse files

fixed: don't append % to an empty humidity label

  • Loading branch information...
1 parent e5653b6 commit f472d3a7fdc58c6f58b39e7ff711500af55581b8 spiff committed Nov 15, 2011
Showing with 4 additions and 1 deletion.
  1. +4 −1 xbmc/utils/Weather.cpp
View
5 xbmc/utils/Weather.cpp
@@ -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)
{

0 comments on commit f472d3a

Please sign in to comment.
Something went wrong with that request. Please try again.