mirror of
https://github.com/bancika/diy-layout-creator
synced 2026-11-10 17:22:09 +10:00
Auto-Wrap Label crashes the application if it's shrunken into zero-lengt
This commit is contained in:
@@ -112,6 +112,12 @@ public class StringUtils {
|
||||
}
|
||||
if (pos == -1)
|
||||
pos = guess; // Split in the middle of the word
|
||||
|
||||
// if we couldn't find a match, expand maxWidth
|
||||
if (pos <= 0) {
|
||||
maxWidth++;
|
||||
continue;
|
||||
}
|
||||
|
||||
list.add(line.substring(0, pos).trim());
|
||||
line = line.substring(pos).trim();
|
||||
|
||||
Reference in New Issue
Block a user