diff options
author | Caolán McNamara <caolanm@redhat.com> | 2017-10-27 09:31:20 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2017-10-27 12:15:52 +0200 |
commit | 6b760dc4bbb496496982d6d7aaa3701903bc3c11 (patch) | |
tree | 77fbb8c905964f0267c15fed8eb8c1e54082544e /basegfx | |
parent | 1f0e40db86fe304338c7cdd772c8ef644b7a0e8b (diff) |
ofz#3826 Divide-by-zero
with fLeftStart == 1.0 (is allowed, see comment at mfCut) the whole
BezierSegment is needed and does not need to be cut at all so best would be to
add it to 'while' loop, after that the 'rest' will be added anyways so, add
'fLeftStart < 1.0' or 'fLeftStart != 1.0' (since limited to [0.0 .. 1.0]) to
the while in line 120 should do it
Change-Id: Ida87e06247d169482df26e665985753e634e149e
Reviewed-on: https://gerrit.libreoffice.org/43935
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'basegfx')
-rw-r--r-- | basegfx/source/polygon/b2dpolygoncutandtouch.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/basegfx/source/polygon/b2dpolygoncutandtouch.cxx b/basegfx/source/polygon/b2dpolygoncutandtouch.cxx index 843b9c64e7ae..3d64dee7838b 100644 --- a/basegfx/source/polygon/b2dpolygoncutandtouch.cxx +++ b/basegfx/source/polygon/b2dpolygoncutandtouch.cxx @@ -117,7 +117,7 @@ namespace basegfx double fLeftStart(0.0); // now add all points targeted to be at this index - while(nNewInd < nTempPointCount && rTempPoints[nNewInd].getIndex() == a) + while (nNewInd < nTempPointCount && rTempPoints[nNewInd].getIndex() == a && fLeftStart < 1.0) { const temporaryPoint& rTempPoint = rTempPoints[nNewInd++]; |