fix empty iterator crash, restart
This commit is contained in:
parent
6a042da5c1
commit
a328ddfd5f
@ -1,5 +1,5 @@
|
|||||||
import csv
|
import csv
|
||||||
def_flags="--no-default-features --features std,snapshot_restore,singlecore"
|
def_flags="--no-default-features --features std,snapshot_restore,singlecore,restarting"
|
||||||
remote="mnt/"
|
remote="mnt/"
|
||||||
|
|
||||||
rule build_showmap:
|
rule build_showmap:
|
||||||
|
@ -305,11 +305,13 @@ where
|
|||||||
let untouched : Vec<_> = marks.iter().filter(
|
let untouched : Vec<_> = marks.iter().filter(
|
||||||
|x| x.2 == 0
|
|x| x.2 == 0
|
||||||
).collect();
|
).collect();
|
||||||
let tmp = interrupt_offsets[i];
|
if untouched.len() > 0 {
|
||||||
let choice = myrand.choose(untouched);
|
let tmp = interrupt_offsets[i];
|
||||||
interrupt_offsets[i] = myrand.between(choice.0.start_tick, choice.0.end_tick)
|
let choice = myrand.choose(untouched);
|
||||||
.try_into().expect("tick > u32");
|
interrupt_offsets[i] = myrand.between(choice.0.start_tick, choice.0.end_tick)
|
||||||
do_rerun = true;
|
.try_into().expect("tick > u32");
|
||||||
|
do_rerun = true;
|
||||||
|
}
|
||||||
// println!("no alternatives, choose random i: {} {} -> {}",i,tmp,interrupt_offsets[i]);
|
// println!("no alternatives, choose random i: {} {} -> {}",i,tmp,interrupt_offsets[i]);
|
||||||
continue;
|
continue;
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user