summaryrefslogtreecommitdiff
path: root/rsvg-path.c
diff options
context:
space:
mode:
authorDom Lachowicz <doml@src.gnome.org>2003-03-14 15:36:11 +0000
committerDom Lachowicz <doml@src.gnome.org>2003-03-14 15:36:11 +0000
commit8def940a99df991c0193a460fc9ae7c241704d61 (patch)
tree6f5d2b0da5efb8b6c4b362b7309f19d4400f9228 /rsvg-path.c
parent0f5337a7df15b31995faa7330c8dc7cc83d2a52c (diff)
downloadlibrsvg-8def940a99df991c0193a460fc9ae7c241704d61.tar.gz
bug 108380, w3 svg conformance improvements
Diffstat (limited to 'rsvg-path.c')
-rw-r--r--rsvg-path.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/rsvg-path.c b/rsvg-path.c
index fe11b208..f1ef974f 100644
--- a/rsvg-path.c
+++ b/rsvg-path.c
@@ -115,6 +115,14 @@ rsvg_path_arc (RSVGParsePathCtx *ctx,
double th0, th1, th_arc;
int i, n_segs;
+ /* Check that neither radius is zero, since its isn't either
+ geometrically or mathematically meaningful and will
+ cause divide by zero and subsequent NaNs. We should
+ really do some ranged check ie -0.001 < x < 000.1 rather
+ can just a straight check again zero.
+ */
+ if ((rx == 0.0) || (ry == 0.0)) return;
+
sin_th = sin (x_axis_rotation * (M_PI / 180.0));
cos_th = cos (x_axis_rotation * (M_PI / 180.0));
a00 = cos_th / rx;