mirror of
https://github.com/peterosterlund2/droidfish.git
synced 2025-12-12 17:12:40 +01:00
DroidFish: Avoid null pointer exception if engine reports that it is currently searching an invalid move.
This commit is contained in:
@@ -321,7 +321,7 @@ public class TextIO {
|
|||||||
}
|
}
|
||||||
private static final String moveToString(Position pos, Move move, boolean longForm,
|
private static final String moveToString(Position pos, Move move, boolean longForm,
|
||||||
List<Move> moves) {
|
List<Move> moves) {
|
||||||
if (move.equals(new Move(0, 0, 0)))
|
if ((move == null) || move.equals(new Move(0, 0, 0)))
|
||||||
return "--";
|
return "--";
|
||||||
StringBuilder ret = new StringBuilder();
|
StringBuilder ret = new StringBuilder();
|
||||||
int wKingOrigPos = Position.getSquare(4, 0);
|
int wKingOrigPos = Position.getSquare(4, 0);
|
||||||
|
|||||||
Reference in New Issue
Block a user