diff --git a/src/svg/svg_parser.cpp b/src/svg/svg_parser.cpp index c93ea4a30..64b2e425d 100644 --- a/src/svg/svg_parser.cpp +++ b/src/svg/svg_parser.cpp @@ -271,7 +271,10 @@ double parse_svg_value(T & parser, char const* str, bool & is_percent) val = 0.0; // restore to default on parsing failure parser.err_handler().on_error("SVG parse error: failed to parse with value \"" + std::string(str) + "\""); } - is_percent = is_percent_; // update only on success + else + { + is_percent = is_percent_; // update only on success + } return val; }