1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-11-30 15:39:54 +00:00

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

View File

@ -88,6 +88,7 @@ string ghost_prefix = "default";
void hread(hstream& hs, ghostmoment& m) { void hread(hstream& hs, ghostmoment& m) {
int id; int id;
hread(hs, m.step, id, m.alpha, m.distance, m.beta, m.footphase); 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]; m.where_cell = mapstream::cellbyid[id];
} }