mirror of
https://github.com/peterosterlund2/droidfish.git
synced 2025-12-13 01:22:41 +01:00
DroidFish: Ignore leading and trailing whitespace when parsing FEN strings.
This commit is contained in:
@@ -45,6 +45,7 @@ public class TextIO {
|
||||
|
||||
/** Parse a FEN string and return a chess Position object. */
|
||||
public static final Position readFEN(String fen) throws ChessParseError {
|
||||
fen = fen.trim();
|
||||
Position pos = new Position();
|
||||
String[] words = fen.split(" ");
|
||||
if (words.length < 2) {
|
||||
|
||||
Reference in New Issue
Block a user