From 3f1f46bc7d006d6518a45aa9c6dde36cdf1039b1 Mon Sep 17 00:00:00 2001 From: nimetu Date: Mon, 24 Jan 2022 14:19:20 +0200 Subject: [PATCH] Fix CSSLength not rejecting percent value --- nel/src/gui/css_length.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/nel/src/gui/css_length.cpp b/nel/src/gui/css_length.cpp index 8523de077..d0c051a08 100644 --- a/nel/src/gui/css_length.cpp +++ b/nel/src/gui/css_length.cpp @@ -66,6 +66,9 @@ bool CSSLength::parseValue(const std::string &value, bool allowPercent, bool all } std::string unit = toLowerAscii(value.substr(pos)); + if (!allowPercent && unit == "%") + return false; + if (knownUnits.count(unit)) { std::string tmpstr = value.substr(0, pos);