Simple fix for the omitted multiplication sign before a left parenthesis (#1661)

* simple fix for the omitted multiplication sign

* accepts unary-op-code
This commit is contained in:
Tian L
2021-08-26 10:58:36 +08:00
committed by GitHub
parent 8797e37e73
commit 10ae9430a0
2 changed files with 9 additions and 3 deletions

View File

@@ -519,6 +519,12 @@ void CCalcEngine::ProcessCommandWorker(OpCode wParam)
if (wParam == IDC_OPENP)
{
// if there's an omitted multiplication sign
if (IsDigitOpCode(m_nLastCom) || IsUnaryOpCode(m_nLastCom) || m_nLastCom == IDC_PNT || m_nLastCom == IDC_CLOSEP)
{
ProcessCommand(IDC_MUL);
}
CheckAndAddLastBinOpToHistory();
m_HistoryCollector.AddOpenBraceToHistory();