SVG parse_svg_value : re-initialise result to default value on parsing error
This commit is contained in:
parent
9901050e14
commit
1568fa3894
1 changed files with 1 additions and 0 deletions
|
@ -275,6 +275,7 @@ double parse_svg_value(T & err_handler, const char* str, bool & is_percent)
|
||||||
x3::lit('%')[apply_percent]),
|
x3::lit('%')[apply_percent]),
|
||||||
x3::space) || (cur != end))
|
x3::space) || (cur != end))
|
||||||
{
|
{
|
||||||
|
val = 0.0;
|
||||||
err_handler.on_error("SVG parse error: failed to parse <number> with value \"" + std::string(str) + "\"");
|
err_handler.on_error("SVG parse error: failed to parse <number> with value \"" + std::string(str) + "\"");
|
||||||
}
|
}
|
||||||
return val;
|
return val;
|
||||||
|
|
Loading…
Reference in a new issue