mirror of
https://github.com/Helium314/HeliBoard.git
synced 2025-05-03 13:14:46 +00:00
fix crash
This commit is contained in:
parent
dd16ac2135
commit
3147d22a18
1 changed files with 2 additions and 2 deletions
|
@ -1534,9 +1534,9 @@ public final class InputLogic {
|
|||
final String result;
|
||||
if (settingsValues.mSpacingAndPunctuations.isWordSeparator(word.codePointBefore(word.length()))) {
|
||||
int endIndex = word.length() - 1;
|
||||
while (settingsValues.mSpacingAndPunctuations.isWordSeparator(word.codePointBefore(endIndex)))
|
||||
while (endIndex != 0 && settingsValues.mSpacingAndPunctuations.isWordSeparator(word.codePointBefore(endIndex)))
|
||||
--endIndex;
|
||||
result = word.substring(0, endIndex);
|
||||
result = (endIndex > 0) ? word.substring(0, endIndex) : word;
|
||||
} else
|
||||
result = word;
|
||||
return result;
|
||||
|
|
Loading…
Add table
Reference in a new issue