The parser choked on time stamps of the form dd:dd or dd:dd:dd if one
of the fields happened to be 00, because it wouldmistake that for a
non-compliant king-side castling. By excluding this interpretation when
the 00 is immediately preceded or followed by ':' this is now prevented.
}
// ********* SAN Castings *************************************
- if(**p == 'O' || **p == 'o' || **p == '0') {
+ if(**p == 'O' || **p == 'o' || **p == '0' && !Match("00:", p)) { // exclude 00 in time stamps
int castlingType = 0;
if(Match("O-O-O", p) || Match("o-o-o", p) || Match("0-0-0", p) ||
Match("OOO", p) || Match("ooo", p) || Match("000", p)) castlingType = 2;
return Nothing;
}
+ // ********* Prevent 00 in unprotected time stamps to be mistaken for castling *******
+ if(Match(":00", p)) return Nothing;
// ********* Could not match to anything. Return offending character ****
(*p)++;