From 4d3468d3a2f754de537643e535b99b8fc33f8231 Mon Sep 17 00:00:00 2001 From: Julien Danjou Date: Mon, 12 Nov 2007 19:09:05 +0100 Subject: [PATCH] check that screen number in rules is not >= screen count --- config.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/config.c b/config.c index 1bda72489..4e80ad909 100644 --- a/config.c +++ b/config.c @@ -454,6 +454,8 @@ parse_config(const char *confpatharg, awesome_config *awesomeconf) awesomeconf->rules[i].tags = NULL; awesomeconf->rules[i].isfloating = cfg_getbool(cfgsectmp, "float"); awesomeconf->rules[i].screen = cfg_getint(cfgsectmp, "screen"); + if(awesomeconf->rules[i].screen >= get_screen_count(awesomeconf->display)) + awesomeconf->rules[i].screen = 0; } compileregs(awesomeconf->rules, awesomeconf->nrules);