mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2024-12-29 02:40:35 +05:00
fix access out of array bounds in FunctionTable::findBounds()
This commit is contained in:
parent
5c744000ba
commit
dbdb0fce59
@ -145,7 +145,7 @@ double FunctionTable::integral( const double a, const double b ) const
|
|||||||
|
|
||||||
bool FunctionTable::findBounds( const double x, int& x_ind_1, int& x_ind_2 ) const
|
bool FunctionTable::findBounds( const double x, int& x_ind_1, int& x_ind_2 ) const
|
||||||
{
|
{
|
||||||
int n = myData.size();
|
int n = myData.size() / 2;
|
||||||
if( n==0 || x<myData[0] )
|
if( n==0 || x<myData[0] )
|
||||||
{
|
{
|
||||||
x_ind_1 = x_ind_2 = 0;
|
x_ind_1 = x_ind_2 = 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user