From 1568fa3894445355ab19d88ecee5bf57e958832d Mon Sep 17 00:00:00 2001 From: Artem Pavlenko Date: Mon, 19 Apr 2021 09:26:13 +0100 Subject: [PATCH] SVG parse_svg_value : re-initialise result to default value on parsing error --- src/svg/svg_parser.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/svg/svg_parser.cpp b/src/svg/svg_parser.cpp index a4540cc91..9cc18f39d 100644 --- a/src/svg/svg_parser.cpp +++ b/src/svg/svg_parser.cpp @@ -275,6 +275,7 @@ double parse_svg_value(T & err_handler, const char* str, bool & is_percent) x3::lit('%')[apply_percent]), x3::space) || (cur != end)) { + val = 0.0; err_handler.on_error("SVG parse error: failed to parse with value \"" + std::string(str) + "\""); } return val;