mirror of
https://github.com/OPM/ResInsight.git
synced 2024-12-28 09:51:44 -06:00
Avoid out of bounds value access in vector
This commit is contained in:
parent
f0b28170da
commit
f3faf4642a
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user