racing:: exception on reading bad ghostmoments

This commit is contained in:
Zeno Rogue 2023-12-12 20:03:59 +01:00
parent cd7af38e2e
commit 4338ec2b43
1 changed files with 1 additions and 0 deletions

View File

@ -88,6 +88,7 @@ string ghost_prefix = "default";
void hread(hstream& hs, ghostmoment& m) {
int id;
hread(hs, m.step, id, m.alpha, m.distance, m.beta, m.footphase);
if(id < 0 || id >= isize(mapstream::cellbyid)) throw hr_exception("error reading a ghost moment");
m.where_cell = mapstream::cellbyid[id];
}