Skip to content

Is 'end of buffer' processing correct? #4

@RogerMarsh

Description

@RogerMarsh

Large PGN files are processed in fixed size chunks read into a buffer.

The purchased version of the TWIC download for weeks 1 through 1500 gave three errors for token 'Result "' when importing the file into an empty ChessTab database: presumably because 'Result "' was at end of buffer.

The unittests which read one character at a time from the PGN stream were thought to cover this case; but here the next thing read will be many characters so the next token seen might be '1-0' at the start of next chunk. Is that seen as the value of the incomplete Result tag at the end of previous chunk, or as a Game Termination Marker?

A unittest module is added which verifies the '1-0' is seen as the value of a Result tag.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions