mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2024-12-28 09:58:30 +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 )
|
||||
{
|
||||
boolean missing = false;
|
||||
for ( int ii = 0; ii < m_paths.length; ++ii ) {
|
||||
if ( names[ii] != null ) {
|
||||
int nNulls = 0;
|
||||
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
|
||||
// name. That's a player using the default dict.
|
||||
if ( null == m_paths[ii] && null == m_bytes[ii] ) {
|
||||
missing = true;
|
||||
break;
|
||||
}
|
||||
missing = null == m_paths[ii] && null == m_bytes[ii];
|
||||
}
|
||||
}
|
||||
return missing;
|
||||
return missing || nNulls == m_paths.length;
|
||||
}
|
||||
} // DictPairs
|
||||
|
||||
|
|
Loading…
Reference in a new issue