1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2025-07-04 18:52:51 +00:00

reg3:: crash when matrix_order result appears to be greater than 1000

This commit is contained in:
Zeno Rogue 2025-06-22 19:02:55 +02:00
parent 2ccba49023
commit 39c7004747

View File

@ -2883,6 +2883,7 @@ EX int matrix_order(const transmatrix A) {
transmatrix T = A;
int res = 1;
while(!eqmatrix(T, Id)) {
if(res >= 1000) throw hr_exception("matrix_order failed");
res++; T = T * A;
}
return res;