Fixed two crashes when working with parametric curves, Issue 590

This commit is contained in:
Ingo
2014-11-05 22:20:17 +01:00
parent 47ed53084d
commit d5eabad293

View File

@@ -72,8 +72,10 @@ DiagonalCurve::DiagonalCurve (const std::vector<double>& p, int poly_pn) {
identity = false;
x = new double[9];
for (int i=0; i<4; i++)
x[i] = p[i];
x[0] = p[0];
for (int i=1; i<4; i++) {
x[i] = min(max(p[i],0.001),0.99);
}
for (int i=4; i<8; i++)
x[i] = (p[i]+100.0)/200.0;
if (p.size()<9)