Kaydet (Commit) 151ee1eb authored tarafından Eike Rathke's avatar Eike Rathke

Use ReverseStack() in NPV()

Change-Id: Iff84889c4ff5f7a2c5916e18911cbf624937a8f4
üst e922d753
......@@ -1293,11 +1293,8 @@ void ScInterpreter::ScNPV()
if ( MustHaveParamCount( nParamCount, 2, 31 ) )
{
double nVal = 0.0;
//We turn the stack upside down!
const FormulaToken* pTemp[ 31 ];
for( short i = 0; i < nParamCount; i++ )
pTemp[ i ] = pStack[ sp - i - 1 ];
memcpy( &pStack[ sp - nParamCount ], pTemp, nParamCount * sizeof( FormulaToken* ) );
// We turn the stack upside down!
ReverseStack( nParamCount);
if (nGlobalError == FormulaError::NONE)
{
double nCount = 1.0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment