Fix usage of temporary string

This commit is contained in:
Michał Janiszewski 2019-03-07 22:09:43 +01:00 committed by Michał Janiszewski
commit 4165617fdf

View file

@ -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;
}