stack-tracker: Fix an off-by-one error in restack_managed

When restacking the last window alone, we would trigger this off-by-one
error. This would throw us off the end of the array, causing lower_below
warnings for nonsensical values.

Since the last window already is lowered below everything else, we
shouldn't need to lower it.
This commit is contained in:
Jasper St. Pierre 2014-09-12 17:10:34 -06:00
parent 2833c702c6
commit a676249c0c

View File

@ -1107,7 +1107,7 @@ meta_stack_tracker_restack_managed (MetaStackTracker *tracker,
new_pos--;
}
while (new_pos >= 0)
while (new_pos > 0)
{
meta_stack_tracker_lower_below (tracker, managed[new_pos], managed[new_pos - 1]);
new_pos--;