summaryrefslogtreecommitdiffstats
path: root/src/ui
diff options
context:
space:
mode:
Diffstat (limited to 'src/ui')
-rw-r--r--src/ui/edit.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/ui/edit.cpp b/src/ui/edit.cpp
index 792e4a9..0e50852 100644
--- a/src/ui/edit.cpp
+++ b/src/ui/edit.cpp
@@ -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;