mirror of
https://github.com/ultravideo/uvg266.git
synced 2024-11-27 19:24:06 +00:00
Reorder condition to prevent indexing past the array
This commit is contained in:
parent
e87b12dec1
commit
bb1f2a0895
|
@ -1366,7 +1366,7 @@ static void search_pu_inter_ref(inter_search_info_t *info,
|
|||
double LX_bits[2] = { best_bits, best_bits };
|
||||
|
||||
// Compute costs and add entries for both lists, if necessary
|
||||
for (; ref_list_active[ref_list] && ref_list < 2; ++ref_list) {
|
||||
for (; ref_list < 2 && ref_list_active[ref_list]; ++ref_list) {
|
||||
|
||||
LX_idx = ref_list_idx[ref_list];
|
||||
uint8_t mv_ref_coded = LX_idx;
|
||||
|
|
Loading…
Reference in a new issue