summaryrefslogtreecommitdiff
path: root/Libraries
diff options
context:
space:
mode:
authorLuke <luke.wilde@live.co.uk>2020-08-19 22:35:31 +0100
committerAndreas Kling <kling@serenityos.org>2020-08-20 16:31:13 +0200
commit65afb40fc505d0bd644fb76747bd63fed5c8340a (patch)
tree7526ee1e49c93ba102286c5506e92acb6c8d83da /Libraries
parent8bbb7e25e69cf0fb56ac100b5624c12a52b3b5da (diff)
downloadserenity-65afb40fc505d0bd644fb76747bd63fed5c8340a.zip
LibWeb: Crash instead of spinning if parse_drawto fails to match
If parse_drawto fails to match anything, it will spin forever. Instead, print out the character that failed to match and assert false.
Diffstat (limited to 'Libraries')
-rw-r--r--Libraries/LibWeb/SVG/SVGPathElement.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/Libraries/LibWeb/SVG/SVGPathElement.cpp b/Libraries/LibWeb/SVG/SVGPathElement.cpp
index 2c43ff0c18..632b4a6996 100644
--- a/Libraries/LibWeb/SVG/SVGPathElement.cpp
+++ b/Libraries/LibWeb/SVG/SVGPathElement.cpp
@@ -133,6 +133,9 @@ void PathDataParser::parse_drawto() {
parse_smooth_quadratic_bezier_curveto();
} else if (match('A') || match('a')) {
parse_elliptical_arc();
+ } else {
+ dbg() << "PathDataParser::parse_drawto failed to match: '" << ch() << "'";
+ TODO();
}
}