Skip to content

Commit ff8c48b

Browse files
committed
Gfx::Length uninitialized values fixed.
1 parent 90f6593 commit ff8c48b

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/base/gfx/length.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,12 @@ Length::Length(const std::string &s)
1111
if (unit == "%")
1212
{
1313
relative = parser.getValue() / 100.0;
14+
absolute = 0.0;
1415
}
1516
else if (unit == "px" || unit.empty())
1617
{
1718
absolute = parser.getValue();
19+
relative = 0.0;
1820
}
1921
else throw std::logic_error("invalid length unit: " + unit);
2022
}

0 commit comments

Comments
 (0)