One EGTB position returns only searchmoves and malformed JSON
Torom opened this issue · comments
Torsten Hellwig commented
For this position: 8/3R2p1/4P2k/8/6K1/4r3/8/8 b - - 0 47
only searchmoves are returned despite there are only 6 pieces left.
json=0
search:e3e1|search:e3e2|search:e3a3|search:e3b3|search:e3c3|search:e3e4|search:e3e5|search:h6g6|search:h6h7|search:g7g6|search:g7g5|search:e3e6
Querying this position with json=1
returns malformed JSON:
{"status":"ok","search_moves":[{"uci":"","san":"Re1},{"uci":"","san":"Re2},{"uci":"","san":"Ra3},{"uci":"","san":"Rb3},{"uci":"","san":"Rc3},{"uci":"","san":"Re4+},{"uci":"","san":"Re5},{"uci":"","san":"Kg6},{"uci":"","san":"Kh7},{"uci":"","san":"g6},{"uci":"","san":"g5},{"uci":"","san":"Rxe6}]}
SyntaxError: JSON.parse: expected ',' or '}' after property value in object at line 1 column 56 of the JSON data
noobpwnftw commented
Thanks for report, illegal JSON is now fixed.
As for searchmoves, it is by design, so that it wouldn't be picking by random, but returning an array of all drawing moves.
Torsten Hellwig commented
I understand, thanks for the fast fix.