[ci skip]EditBox::setText() may crash on some Android devices

This commit is contained in:
Knox 2017-09-28 10:59:03 +08:00 committed by minggo
parent 78a167fec1
commit 0d37220beb
1 changed files with 1 additions and 1 deletions

View File

@ -335,7 +335,7 @@ public class Cocos2dxEditBoxHelper {
if (editBox != null) {
editBox.setChangedTextProgrammatically(true);
editBox.setText(text);
int position = text.length();
int position = editBox.getText().length();
editBox.setSelection(position);
}
}