diff options
Diffstat (limited to 'render/layout.c')
-rw-r--r-- | render/layout.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/render/layout.c b/render/layout.c index 3b9a61810..3ea45c789 100644 --- a/render/layout.c +++ b/render/layout.c @@ -431,7 +431,9 @@ struct box * layout_line(struct box * first, unsigned long width, unsigned long c2->next = c->next; c->next = c2; c2->prev = c; - if (!c2->next) + if (c2->next) + c2->next->prev = c2; + else c2->parent->last = c2; b = c2; } @@ -460,7 +462,9 @@ struct box * layout_line(struct box * first, unsigned long width, unsigned long c2->next = c->next; c->next = c2; c2->prev = c; - if (!c2->next) + if (c2->next) + c2->next->prev = c2; + else c2->parent->last = c2; b = c2; x += space_before + w; |