mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2024-11-27 14:37:16 +00:00
parent_id not works correctly with which==0
This commit is contained in:
parent
a9535878c4
commit
e747b04c5f
@ -446,6 +446,7 @@ int parent_id(cell *c, int which, const cellfunction& cf) {
|
||||
|
||||
if(cf(c->cmove(i)) == d) {
|
||||
again:
|
||||
if(!which) return i;
|
||||
int i2 = c->c.fix(i+which);
|
||||
if(cf(c->cmove(i2)) == d) {
|
||||
i = i2; goto again;
|
||||
|
Loading…
Reference in New Issue
Block a user