Skip to content
Snippets Groups Projects
Commit aef10566 authored by valerio's avatar valerio
Browse files

Fix: check boundary before reading array

git-svn-id: https://dng.biozentrum.unibas.ch/svn/openstructure/trunk@2232 5a81b35b-ba03-0410-adc8-b2c5c5119f08
parent dcec9763
No related branches found
No related tags found
No related merge requests found
...@@ -297,7 +297,7 @@ SplineEntryList Spline::Generate(int nsub) const ...@@ -297,7 +297,7 @@ SplineEntryList Spline::Generate(int nsub) const
float psum=0.0; float psum=0.0;
float qsum=0.0; float qsum=0.0;
++c; ++c;
while(sublist[c].type==1 && c<nsub*size) { while(c<nsub*size && sublist[c].type==1) {
n = geom::Normalize(geom::Cross(sublist[c].normal, n = geom::Normalize(geom::Cross(sublist[c].normal,
sublist[c].direction)); sublist[c].direction));
geom::Vec3 p1 = sublist[c].position+n; geom::Vec3 p1 = sublist[c].position+n;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment