Menu

#46 CandlePlot.CalculatePhysicalSeparation fails with 3 points

open
nobody
None
5
2006-09-01
2006-09-01
prosa
No

(NPlot version 0.9.9)

CalculatePhysicalSeparation body has a conditional
statement:

if (cd.Count > 2)
{
...
}

Into the true branch, there are 4 assignments that
access the first four items of the cd collection.
If cd contains exactly 3 items the fourth assignment
fails with an IndexOutOfBoundException.

I modified the boolean expression to check for at least
4 element and the error was disappeared.

Giorgio

Discussion


Log in to post a comment.

Auth0 Logo