diff --git a/nel/src/gui/css_length.cpp b/nel/src/gui/css_length.cpp index b68b90f25..8523de077 100644 --- a/nel/src/gui/css_length.cpp +++ b/nel/src/gui/css_length.cpp @@ -69,7 +69,11 @@ bool CSSLength::parseValue(const std::string &value, bool allowPercent, bool all if (knownUnits.count(unit)) { std::string tmpstr = value.substr(0, pos); - return fromString(tmpstr, m_Value); + if (fromString(tmpstr, m_Value)) + { + setUnit(unit); + return true; + } } return false;