dartchess icon indicating copy to clipboard operation
dartchess copied to clipboard

Bug in PGN parser

Open kuruhuru opened this issue 10 months ago • 1 comments

Hello! I found a problem when loading pgn with '{\nsome comments' pattern. May be even inside '(' variation I added example modified file wcc_2023_1.pgn wcc_2023_1.txt

I modified it here... image

And when I run the following code the application hangs

void main(List<String> args) {
  final String data = File('bin/pgn/wcc_2023_1.pgn').readAsStringSync();
  final List<PgnGame<PgnNodeData>> games = PgnGame.parseMultiGamePgn(data);
  print('Games: ${games.length}');
  print('Game 1: ${games[0].makePgn()}');
}

kuruhuru avatar Apr 07 '24 14:04 kuruhuru