diff options
Diffstat (limited to 'render')
-rw-r--r-- | render/layout.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/render/layout.c b/render/layout.c index 67e3219ca..9b479da17 100644 --- a/render/layout.c +++ b/render/layout.c @@ -4493,14 +4493,14 @@ void layout_compute_relative_offset(struct box *box, int *x, int *y) assert(left == -right); - if (top == AUTO && bottom == AUTO) + if (top == AUTO && bottom == AUTO) { top = bottom = 0; - else if (top == AUTO) + } else if (top == AUTO) { top = -bottom; - else if (bottom == AUTO) - bottom = -top; - else + } else { + /* bottom is AUTO, or neither are AUTO */ bottom = -top; + } #ifdef LAYOUT_DEBUG LOG(("left %i, right %i, top %i, bottom %i", left, right, top, bottom)); |