diff --git a/escher/src/text_field.cpp b/escher/src/text_field.cpp index 952c3090d..f84d83bf5 100644 --- a/escher/src/text_field.cpp +++ b/escher/src/text_field.cpp @@ -233,6 +233,8 @@ size_t TextField::ContentView::deleteSelection() { * are invalid */ m_selectionStart = nullptr; m_selectionEnd = nullptr; + assert(removedLength <= m_currentDraftTextLength); + m_currentDraftTextLength -= removedLength; return removedLength; }