1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2026-02-06 01:40:15 +00:00

fixed a crash due to not using PIU in fieldval_uniq_rand

This commit is contained in:
Zeno Rogue
2019-08-20 13:15:18 +02:00
parent 7aed1b8551
commit 5a45c1c062
2 changed files with 7 additions and 1 deletions

View File

@@ -409,6 +409,12 @@ EX int fieldval_uniq(cell *c) {
}
EX int fieldval_uniq_rand(cell *c, int randval) {
if(prod) {
auto c1 = product::get_where(c).first;
int res;
product::in_underlying_map([&] { res = fieldval_uniq_rand(c1, randval); });
return res;
}
if(sphere || euclid || NONSTDVAR)
// we do not care in these cases
return fieldval_uniq(c);