1
0
mirror of https://codeberg.org/Freeyourgadget/Gadgetbridge synced 2024-12-25 18:15:49 +01:00

Fix endless loop and resulting OOM when RTL support is enabled and a word is exactly the configured max line length

This should be reviewed by the original author
And could be connected to  #1311
This commit is contained in:
Andreas Shimokawa 2018-11-22 18:58:41 +01:00
parent c1fde5611c
commit 2facd9df6c

View File

@ -527,7 +527,7 @@ public class RtlUtils {
do {
if ((line.length() + phrase.length() + word.length() < line_max_size) ||
(line.length() == 0 && word.length() > line_max_size)) {
(line.length() == 0 && word.length() >= line_max_size)) {
if (isSpaceSign(c)) {
word.append(c);
addCharToWord = true;