mirror of
https://github.com/peterosterlund2/droidfish.git
synced 2025-02-17 09:37:50 +01:00
DroidFish: Fixed crash when receiving an incorrect PGN intent.
This commit is contained in:
parent
0553222853
commit
b5cc492c38
|
@ -737,8 +737,7 @@ public class DroidFish extends Activity
|
|||
PGNFile pgnFile = new PGNFile(fn);
|
||||
long fileLen = FileUtil.getFileLength(fn);
|
||||
Pair<GameInfoResult,ArrayList<GameInfo>> gi = pgnFile.getGameInfo(this, null, 2);
|
||||
int nGames = gi.second.size();
|
||||
if ((fileLen > 1024 * 1024) || (gi.first == GameInfoResult.OK && nGames > 1)) {
|
||||
if ((fileLen > 1024 * 1024) || (gi.first == GameInfoResult.OK && gi.second.size() > 1)) {
|
||||
filename = fn;
|
||||
} else {
|
||||
in = new FileInputStream(fn);
|
||||
|
|
Loading…
Reference in New Issue
Block a user