mirror of
https://github.com/Microsoft/calculator.git
synced 2025-07-13 08:42:53 -07:00
Fix usage of temporary string (#185)
This commit is contained in:
parent
c325cb1b3a
commit
c6b770eec8
1 changed files with 2 additions and 2 deletions
|
@ -488,7 +488,7 @@ void StandardCalculatorViewModel::HandleUpdatedOperandData(Command cmdenum)
|
|||
m_selectedExpressionLastData = L"";
|
||||
if (ch == 'x')
|
||||
{
|
||||
temp = L'\0';
|
||||
temp[0] = L'\0';
|
||||
commandIndex = 0;
|
||||
}
|
||||
else
|
||||
|
@ -505,7 +505,7 @@ void StandardCalculatorViewModel::HandleUpdatedOperandData(Command cmdenum)
|
|||
{
|
||||
if (commandIndex == 0)
|
||||
{
|
||||
delete temp;
|
||||
delete [] temp;
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue