DroidFish: Fixed crash when engine did not report a ponder move.

This commit is contained in:
Peter Osterlund 2012-07-20 21:38:25 +00:00
parent c0bc8d3556
commit 1f5f5c9522
2 changed files with 3 additions and 1 deletions

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="org.petero.droidfish"
android:versionCode="50"
android:versionCode="51"
android:versionName="1.44"
android:installLocation="auto">
<supports-screens android:largeScreens="true"

View File

@ -430,6 +430,8 @@ public class TextIO {
* @return True if move is valid in position pos, false otherwise.
*/
public static final boolean isValid(Position pos, Move move, ArrayList<Move> moves) {
if (move == null)
return false;
if (moves == null) {
moves = new MoveGen().pseudoLegalMoves(pos);
moves = MoveGen.removeIllegal(pos, moves);