summaryrefslogtreecommitdiff
path: root/sc/source/core/tool/interpr1.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sc/source/core/tool/interpr1.cxx')
-rw-r--r--sc/source/core/tool/interpr1.cxx5
1 files changed, 3 insertions, 2 deletions
diff --git a/sc/source/core/tool/interpr1.cxx b/sc/source/core/tool/interpr1.cxx
index ff8a990afff1..f6caa793f61a 100644
--- a/sc/source/core/tool/interpr1.cxx
+++ b/sc/source/core/tool/interpr1.cxx
@@ -354,11 +354,11 @@ void ScInterpreter::ScIfError( bool bNAonly )
SCSIZE nC = 0, nR = 0;
for ( ; nC < nCols && (nC != nErrorCol || nR != nErrorRow); /*nop*/ )
{
- for ( ; nR < nRows && (nC != nErrorCol || nR != nErrorRow); ++nR)
+ for (nR = 0 ; nR < nRows && (nC != nErrorCol || nR != nErrorRow); ++nR)
{
lcl_storeJumpMatResult(pMatPtr, pJumpMat, nC, nR);
}
- if (nC != nErrorCol || nR != nErrorRow)
+ if (nC != nErrorCol && nR != nErrorRow)
++nC;
}
// Now the mixed cases.
@@ -376,6 +376,7 @@ void ScInterpreter::ScIfError( bool bNAonly )
lcl_storeJumpMatResult(pMatPtr, pJumpMat, nC, nR);
}
}
+ nR = 0;
}
xNew = new ScJumpMatrixToken( pJumpMat );
GetTokenMatrixMap().insert( ScTokenMatrixMap::value_type( pCur, xNew ));