mirror of
https://github.com/emersion/kanshi
synced 2024-11-22 15:51:58 +01:00
Fix index in match_profile
This commit is contained in:
parent
46d1b9feb8
commit
72498b95dc
6
main.c
6
main.c
@ -35,18 +35,20 @@ static bool match_profile(struct kanshi_state *state,
|
||||
struct kanshi_profile_output *profile_output;
|
||||
wl_list_for_each(profile_output, &profile->outputs, link) {
|
||||
bool output_matched = false;
|
||||
size_t i = 0;
|
||||
ssize_t i = -1;
|
||||
struct kanshi_head *head;
|
||||
wl_list_for_each(head, &state->heads, link) {
|
||||
i++;
|
||||
|
||||
if (matches[i] != NULL) {
|
||||
continue; // already matched
|
||||
}
|
||||
|
||||
if (match_profile_output(profile_output, head)) {
|
||||
matches[i] = head;
|
||||
output_matched = true;
|
||||
break;
|
||||
}
|
||||
i++;
|
||||
}
|
||||
|
||||
if (!output_matched) {
|
||||
|
Loading…
Reference in New Issue
Block a user