ralfstuckert / pdfbox-layout

MIT License
156 stars 74 forks source link

Fix potential breakWordHard StringIndexOutOfBoundsException #77

Closed mealingr closed 2 years ago

mealingr commented 4 years ago

This is a small fix for a potential StringIndexOutOfBoundsException that can happen if cutIndex is increased to be greater than word.length() e.g. via

breakWordHard("sometext-0000-0000", new FontDescriptor(PDType1Font.HELVETICA, 10), 92.65513f)

Thanks