mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-10-06 10:22:23 +00:00
racing:: exception on reading bad ghostmoments
This commit is contained in:
@@ -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];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user