From 4577c64ec4adfc886acdd64d1c540a6691fe8148 Mon Sep 17 00:00:00 2001 From: Julien Danjou Date: Sun, 16 Dec 2007 18:07:02 +0100 Subject: [PATCH] don't allow ncol to be <= 0 --- layouts/tile.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/layouts/tile.c b/layouts/tile.c index ffa75511..aec4e87f 100644 --- a/layouts/tile.c +++ b/layouts/tile.c @@ -129,7 +129,8 @@ _tile(int screen, const Bool right) else mh = mw = 0; - real_ncol = MIN(otherwin, curtag->ncol); + if((real_ncol = MIN(otherwin, curtag->ncol) <= 0)) + real_ncol = 1; for(i = 0, c = globalconf.clients; c; c = c->next) {