From: Steinar H. Gunderson Date: Sun, 23 Nov 2014 12:02:46 +0000 (+0100) Subject: Deal with inconsistent zero padding in PGN clocks. X-Git-Url: https://git.sesse.net/?p=remoteglot;a=commitdiff_plain;h=01b91aa7e25d94d3cc26db79271d8e6f05a60462 Deal with inconsistent zero padding in PGN clocks. --- diff --git a/remoteglot.pl b/remoteglot.pl index b546589..63cdac2 100755 --- a/remoteglot.pl +++ b/remoteglot.pl @@ -983,6 +983,9 @@ sub extract_clock { if (exists($tags->{'WhiteClock'}) && exists($tags->{'BlackClock'})) { $pos->{'white_clock'} = $tags->{'WhiteClock'}; $pos->{'black_clock'} = $tags->{'BlackClock'}; + + $pos->{'white_clock'} =~ s/\b(\d)\b/0$1/g; + $pos->{'black_clock'} =~ s/\b(\d)\b/0$1/g; return; }