If you type text as multiline and then delete the backspace, crash will occur.
textEditor = TextEditor::New();
textEditor.SetBackgroundColor( Color::CYAN );
textEditor.SetSize( 500.f, 500.f );
textEditor.SetPosition( 100.f, 150.f );
textEditor.SetAnchorPoint( AnchorPoint::TOP_LEFT );
stage.Add( textEditor );
Change-Id: I83a6cd986dd646b2c45efffc048e3d36b479ad5f
// Check whether the indices for updating the text is valid
if ( numberOfCharacters > 0u &&
- ( mTextUpdateInfo.mParagraphCharacterIndex >= numberOfCharacters ||
+ ( mTextUpdateInfo.mParagraphCharacterIndex > numberOfCharacters ||
mTextUpdateInfo.mRequestedNumberOfCharacters > numberOfCharacters ) )
{
std::string currentText;
// Make sure the index is not out of bound
if ( charactersToGlyph.Count() != glyphsPerCharacter.Count() ||
requestedNumberOfCharacters > charactersToGlyph.Count() ||
- ( lastIndex >= charactersToGlyph.Count() && charactersToGlyph.Count() > 0u ) )
+ ( lastIndex > charactersToGlyph.Count() && charactersToGlyph.Count() > 0u ) )
{
std::string currentText;
GetText( currentText );