mirror of
https://github.com/OPM/ResInsight.git
synced 2026-08-18 09:05:11 -05:00
Avoid out of bounds value access in vector
This commit is contained in:
@@ -143,7 +143,8 @@ void RigFemPartResultCalculatorGamma::calculateGammaFromFrames( int
|
||||
{
|
||||
int nodeIdx = femPart->nodeIdxFromElementNodeResultIdx( elmNodResIdx );
|
||||
|
||||
float por = srcPORFrameData[nodeIdx];
|
||||
float por = inf;
|
||||
if ( nodeIdx < srcPORFrameData.size() ) por = srcPORFrameData[nodeIdx];
|
||||
|
||||
if ( por == inf || fabs( por ) < 0.01e6 * 1.0e-5 )
|
||||
dstFrameData[elmNodResIdx] = inf;
|
||||
|
||||
Reference in New Issue
Block a user