Ensure svg number + units parser fails on cur != end condition (got missed via cherry-pick)

This commit is contained in:
artemp 2017-08-08 13:12:11 +01:00
parent 3597c585be
commit f64c7573b1

View file

@ -259,7 +259,7 @@ double parse_svg_value(T & err_handler, const char* str, bool & percent)
> - (units[ ref(val) *= _1] > - (units[ ref(val) *= _1]
| |
lit('%')[ref(val) *= 0.01][ref(percent) = true]), lit('%')[ref(val) *= 0.01][ref(percent) = true]),
skip_type())) skip_type()) || cur != end)
{ {
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) + "\"");
} }