mirror of
https://github.com/foliojs/pdfkit.git
synced 2026-02-01 16:56:57 +00:00
Fix infinite loop when lineWidth is smaller than width of a character. Not sure about what to do in this case yet.
This commit is contained in:
parent
1228c259bd
commit
17e08a66dd
@ -123,6 +123,10 @@ class LineWrapper extends EventEmitter {
|
||||
}
|
||||
}
|
||||
|
||||
if (l === 0 && this.spaceLeft === this.lineWidth) {
|
||||
l = 1;
|
||||
}
|
||||
|
||||
// send a required break unless this is the last piece and a linebreak is not specified
|
||||
fbk.required = bk.required || l < word.length;
|
||||
shouldContinue = fn(word.slice(0, l), w, fbk, lbk);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user