mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-08-29 00:42:19 +00:00
error checking in hrmap_inverse::relative_matrixc
This commit is contained in:
parent
33e6e112d3
commit
6b7a8a2a66
@ -1226,8 +1226,10 @@ EX namespace gp {
|
||||
}
|
||||
|
||||
transmatrix relative_matrixc(cell *c2, cell *c1, const hyperpoint& hint) override {
|
||||
c1 = mapping[c1];
|
||||
c2 = mapping[c2];
|
||||
if(!mapping.count(c1)) { rate_limited_error("c1 is bad", lalign(0, " c1 = ", c1)); return Id; }
|
||||
if(!mapping.count(c2)) { rate_limited_error("c2 is bad", lalign(0, " c2 = ", c2)); return Id; }
|
||||
c1 = mapping.at(c1);
|
||||
c2 = mapping.at(c2);
|
||||
return in_underlying([&] { return currentmap->relative_matrix(c2, c1, hint); });
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user