This commit is contained in:
AZero13 2025-07-05 18:42:27 +09:00 committed by GitHub
commit 66b6e80172
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 5 additions and 8 deletions

View file

@ -522,8 +522,7 @@ void CCalcEngine::ProcessCommandWorker(OpCode wParam)
ResolveHighestPrecedenceOperation();
while (m_fPrecedence && m_precedenceOpCount > 0)
{
m_precedenceOpCount--;
m_nOpCode = m_nPrecOp[m_precedenceOpCount];
m_nOpCode = m_nPrecOp[--m_precedenceOpCount];
m_lastVal = m_precedenceVals[m_precedenceOpCount];
// Precedence Inversion check
@ -643,9 +642,7 @@ void CCalcEngine::ProcessCommandWorker(OpCode wParam)
m_HistoryCollector.AddCloseBraceToHistory();
// Now get back the operation and opcode at the beginning of this parenthesis pair
m_openParenCount -= 1;
m_lastVal = m_parenVals[m_openParenCount];
m_lastVal = m_parenVals[--m_openParenCount];
m_nOpCode = m_nOp[m_openParenCount];
// m_bChangeOp should be true if m_nOpCode is valid

View file

@ -298,7 +298,7 @@ void _divnumx(PNUMBER* pa, PNUMBER b, int32_t precision)
while (cdigits++ < thismax && !zernum(rem))
{
int32_t digit = 0;
MANTTYPE digit = 0;
*ptrc = 0;
while (!lessnum(rem, b))
{
@ -334,7 +334,7 @@ void _divnumx(PNUMBER* pa, PNUMBER b, int32_t precision)
cdigits--;
if (c->mant != ++ptrc)
{
memmove(c->mant, ptrc, (int)(cdigits * sizeof(MANTTYPE)));
memmove(c->mant, ptrc, cdigits * sizeof(MANTTYPE));
}
if (!cdigits)

View file

@ -624,7 +624,7 @@ void StandardCalculatorViewModel::HandleUpdatedOperandData(Command cmdenum)
temp[i] = data[j++];
}
temp[i] = L'\0';
commandIndex += 1;
commandIndex++;
}
}