diff -r 41017d0a72c5 -r 84f2e380a434 src/chess/rules.c --- a/src/chess/rules.c Mon Jun 16 13:45:31 2014 +0200 +++ b/src/chess/rules.c Mon Jun 16 15:41:06 2014 +0200 @@ -40,7 +40,7 @@ *lastmovecopy = *(simulation.lastmove); simulation.movelist = simulation.lastmove = lastmovecopy; } - + return simulation; } @@ -421,13 +421,13 @@ } } else { /* bishop aspect */ - int dr = move->torow > move->fromrow ? 1 : -1; - int df = move->tofile > move->fromfile ? 1 : -1; + int dr = threat->torow > threat->fromrow ? 1 : -1; + int df = threat->tofile > threat->fromfile ? 1 : -1; - uint8_t row = move->fromrow; - uint8_t file = move->fromfile; - while (!canescape && file != move->tofile - df - && row != move->torow - dr) { + uint8_t row = threat->fromrow; + uint8_t file = threat->fromfile; + while (!canescape && file != threat->tofile - df + && row != threat->torow - dr) { row += dr; file += df; canescape |= is_protected(&simulation, row, file,