mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-16 15:41:16 +01:00
modify anyMissing[dict] logic: having some null is ok, but all null is
not.
This commit is contained in:
parent
8cc6f8b7cd
commit
44e0f30520
1 changed files with 7 additions and 7 deletions
|
@ -91,17 +91,17 @@ public class DictUtils {
|
||||||
public boolean anyMissing( final String[] names )
|
public boolean anyMissing( final String[] names )
|
||||||
{
|
{
|
||||||
boolean missing = false;
|
boolean missing = false;
|
||||||
for ( int ii = 0; ii < m_paths.length; ++ii ) {
|
int nNulls = 0;
|
||||||
if ( names[ii] != null ) {
|
for ( int ii = 0; !missing && ii < m_paths.length; ++ii ) {
|
||||||
|
if ( names[ii] == null ) {
|
||||||
|
++nNulls;
|
||||||
|
} else {
|
||||||
// It's ok for there to be no dict IFF there's no
|
// It's ok for there to be no dict IFF there's no
|
||||||
// name. That's a player using the default dict.
|
// name. That's a player using the default dict.
|
||||||
if ( null == m_paths[ii] && null == m_bytes[ii] ) {
|
missing = null == m_paths[ii] && null == m_bytes[ii];
|
||||||
missing = true;
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
return missing || nNulls == m_paths.length;
|
||||||
return missing;
|
|
||||||
}
|
}
|
||||||
} // DictPairs
|
} // DictPairs
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue