mirror of
https://github.com/Microsoft/calculator.git
synced 2025-07-14 01:02:52 -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"";
|
m_selectedExpressionLastData = L"";
|
||||||
if (ch == 'x')
|
if (ch == 'x')
|
||||||
{
|
{
|
||||||
temp = L'\0';
|
temp[0] = L'\0';
|
||||||
commandIndex = 0;
|
commandIndex = 0;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -505,7 +505,7 @@ void StandardCalculatorViewModel::HandleUpdatedOperandData(Command cmdenum)
|
||||||
{
|
{
|
||||||
if (commandIndex == 0)
|
if (commandIndex == 0)
|
||||||
{
|
{
|
||||||
delete temp;
|
delete [] temp;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue