* Fixed crash when inputing cheats

dev-ui
erihel 2013-02-11 20:17:43 +01:00
parent 3f6a6a9eef
commit c7371da676
1 changed files with 6 additions and 6 deletions

View File

@ -2836,20 +2836,20 @@ void CEdit::InsertOne(char character)
{
m_text[i] = m_text[i-1]; // shoot
//if ( m_format.size() > 0 )
//{
if ( m_format.size() > static_cast<unsigned int>(i) )
{
m_format[i] = m_format[i-1]; // shoot
//}
}
}
m_len ++;
m_text[m_cursor1] = character;
//if ( m_format.size() > 0 )
//{
if ( m_format.size() > static_cast<unsigned int>(m_cursor1) )
{
m_format[m_cursor1] = 0;
//}
}
m_cursor1++;
m_cursor2 = m_cursor1;