mirror of
https://github.com/peterosterlund2/droidfish.git
synced 2024-11-27 14:15:16 +01:00
DroidFish: Ignore UTF8 byte order mark when reading PGN files.
This commit is contained in:
parent
c2427ac4c3
commit
fdb4d70cbb
|
@ -137,6 +137,11 @@ public class PGNFile {
|
|||
int len = line.length();
|
||||
if (len == 0)
|
||||
continue;
|
||||
if ((filePos == 0) && (len > 1) && (line.charAt(0) == '\uFEFF')) {
|
||||
line = line.substring(1);
|
||||
len--;
|
||||
filePos += 3;
|
||||
}
|
||||
boolean isHeader = line.charAt(0) == '[';
|
||||
if (isHeader) {
|
||||
if (!line.contains("\"")) // Try to avoid some false positives
|
||||
|
|
Loading…
Reference in New Issue
Block a user