boot/efi: do not assign variable twice
If the highlighted line did not move outside of the visible region, it should not be necessary to update idx_last. CID #1287137, #1287138.
This commit is contained in:
+1
-4
@@ -809,15 +809,12 @@ static BOOLEAN menu_run(Config *config, ConfigEntry **chosen_entry, CHAR16 *load
|
||||
idx_last = idx_highlight;
|
||||
idx_first = 1 + idx_highlight - visible_max;
|
||||
refresh = TRUE;
|
||||
}
|
||||
if (idx_highlight < idx_first) {
|
||||
} else if (idx_highlight < idx_first) {
|
||||
idx_first = idx_highlight;
|
||||
idx_last = idx_highlight + visible_max-1;
|
||||
refresh = TRUE;
|
||||
}
|
||||
|
||||
idx_last = idx_first + visible_max-1;
|
||||
|
||||
if (!refresh && idx_highlight != idx_highlight_prev)
|
||||
highlight = TRUE;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user