mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2024-11-23 21:07:17 +00:00
fixed a crash due to not using PIU in fieldval_uniq_rand
This commit is contained in:
parent
7aed1b8551
commit
5a45c1c062
@ -30,7 +30,7 @@ struct fgeomextra {
|
||||
extern int subpathid;
|
||||
extern int subpathorder;
|
||||
|
||||
#define MWDIM (WDIM+1)
|
||||
#define MWDIM (prod ? 3 : WDIM+1)
|
||||
|
||||
bool isprime(int n) {
|
||||
for(int k=2; k<n; k++) if(n%k == 0) return false;
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user