Fixed CEdit delete[] issues
parent
86109a8c1e
commit
c8f39a4c96
|
@ -1483,7 +1483,7 @@ bool CEdit::ReadText(const char *filename, int addSize)
|
||||||
FreeImage();
|
FreeImage();
|
||||||
|
|
||||||
if (m_text != nullptr)
|
if (m_text != nullptr)
|
||||||
delete m_text;
|
delete[] m_text;
|
||||||
|
|
||||||
m_text = new char[m_maxChar+1];
|
m_text = new char[m_maxChar+1];
|
||||||
memset(m_text, 0, m_maxChar+1);
|
memset(m_text, 0, m_maxChar+1);
|
||||||
|
@ -1873,7 +1873,7 @@ bool CEdit::ReadText(const char *filename, int addSize)
|
||||||
m_len = j;
|
m_len = j;
|
||||||
m_imageTotal = iIndex;
|
m_imageTotal = iIndex;
|
||||||
|
|
||||||
delete buffer;
|
delete[] buffer;
|
||||||
|
|
||||||
Justif();
|
Justif();
|
||||||
ColumnFix();
|
ColumnFix();
|
||||||
|
|
Loading…
Reference in New Issue