mirror of
https://github.com/rkd77/elinks.git
synced 2025-02-02 15:09:23 -05:00
justify_line(): Re-add wordlen == 0 test
This fixes ELinks crashing on this with terminal width e.g. 103: <p align="justify"> xxxx xxxx xxxx xxxxx xxxxxxx xxxxx xxxxx xxxxx xxxxx xxxxx xxxxx xxxxx xxxxx xxxx xxxxxxx xxx xxxxxxx xxx xxxx xxxx xxxx xx xxxx x xxx xxxx xxxx xx xxxx xxxx xxxx xxx—xxx xxxx xx—xxx xxxx<em> </em>x xxxx </p> This test was removed for an unknown reason in commit b1cc71778933502945d3b18482edc0a012fa4365. Discovered together with Miciah.
This commit is contained in:
parent
1fd2a77416
commit
18cdce6c39
@ -1128,6 +1128,7 @@ justify_line(struct html_context *html_context, int y)
|
||||
|
||||
assert(word_len >= 0);
|
||||
if_assert_failed continue;
|
||||
if (!word_len) continue;
|
||||
|
||||
word_shift = (word * diff) / (spaces - 1);
|
||||
new_start = word_start + word_shift;
|
||||
|
Loading…
x
Reference in New Issue
Block a user