check that screen number in rules is not >= screen count

This commit is contained in:
Julien Danjou 2007-11-12 19:09:05 +01:00
parent f70424487e
commit 4d3468d3a2
1 changed files with 2 additions and 0 deletions

View File

@ -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);