From b48a5b6efb6c4529dbac9c6b3a844896a3bc98ca Mon Sep 17 00:00:00 2001 From: Nicholas Marriott Date: Sat, 19 Oct 2019 12:40:43 +0000 Subject: Do not crash trying to fix layout size if only one cell, from Azat Khuzhin. --- usr.bin/tmux/layout-custom.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'usr.bin') diff --git a/usr.bin/tmux/layout-custom.c b/usr.bin/tmux/layout-custom.c index fa5b406d67d..3eea858dc41 100644 --- a/usr.bin/tmux/layout-custom.c +++ b/usr.bin/tmux/layout-custom.c @@ -1,4 +1,4 @@ -/* $OpenBSD: layout-custom.c,v 1.17 2019/10/14 09:16:48 nicm Exp $ */ +/* $OpenBSD: layout-custom.c,v 1.18 2019/10/19 12:40:42 nicm Exp $ */ /* * Copyright (c) 2010 Nicholas Marriott @@ -210,7 +210,7 @@ layout_parse(struct window *w, const char *layout) } break; } - if (lc->sx != sx || lc->sy != sy) { + if (lc->type != LAYOUT_WINDOWPANE && (lc->sx != sx || lc->sy != sy)) { log_debug("fix layout %u,%u to %u,%u", lc->sx, lc->sy, sx,sy); layout_print_cell(lc, __func__, 0); lc->sx = sx - 1; lc->sy = sy - 1; -- cgit v1.2.3