Fix debug assert on map_state.num_covered_map_indexes (#2310)

This commit is contained in:
lazymio 2024-06-14 19:29:38 +08:00 committed by GitHub
parent c415b4d5f6
commit 18a25d3b3d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -495,10 +495,11 @@ where
.enumerate()
.filter(|(_, value)| *value != initial)
{
if history_map[i] == initial {
let val = R::reduce(history_map[i], value);
if history_map[i] == initial && val != initial {
map_state.num_covered_map_indexes += 1;
}
history_map[i] = R::reduce(history_map[i], value);
history_map[i] = val;
indices.push(i);
}
let meta = MapIndexesMetadata::new(indices);
@ -510,10 +511,11 @@ where
.enumerate()
.filter(|(_, value)| *value != initial)
{
if history_map[i] == initial {
let val = R::reduce(history_map[i], value);
if history_map[i] == initial && val != initial {
map_state.num_covered_map_indexes += 1;
}
history_map[i] = R::reduce(history_map[i], value);
history_map[i] = val;
}
}