commit | bb797dc4fb8320488f47bf11de07a733d7233e1f | [log] [tgz] |
---|---|---|
author | Keith Rarick <kr@xph.us> | Sat Sep 05 22:45:08 2015 |
committer | Keith Rarick <kr@xph.us> | Sat Sep 05 22:45:08 2015 |
tree | f81cd9323a92bb020ac18bd39e1a818bc50fde86 | |
parent | e373e137fafd8abd480af49182dea0513914adb4 [diff] |
text: fix infinite loop in Wrap If the last word is greater than the limit, we wouldn't set the next line break at all, and it would be left at 0, causing an infinite loop in the final loop to apply the line breaks. To fix this, recognize that the last word must be on the last line, so its length doesn't matter. Always set the last word's next break to the end of the text. Fixes #1. Closes #2.