From 234465387b1747a5e4be5196995947ea0ed9beff Mon Sep 17 00:00:00 2001 From: Nimetu Date: Sat, 12 Jun 2021 00:11:38 +0300 Subject: [PATCH] Fix getCssLength returning false for '0' --- nel/src/gui/libwww.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/nel/src/gui/libwww.cpp b/nel/src/gui/libwww.cpp index 362dce8e2..200e7baf1 100644 --- a/nel/src/gui/libwww.cpp +++ b/nel/src/gui/libwww.cpp @@ -215,6 +215,13 @@ namespace NLGUI return false; } + if (len == 1 && str[0] == '0') + { + value = 0; + unit.clear(); + return true; + } + while(pos < len) { bool isNumeric = (str[pos] >= '0' && str[pos] <= '9')