fix NPE: scores array isn't always there

This commit is contained in:
eehouse 2010-05-08 15:24:13 +00:00
parent b62fcfd5ce
commit f8d4b1fd34

View file

@ -213,11 +213,9 @@ public class CurGameInfo {
{
StringBuffer sb = new StringBuffer();
String vsString = context.getString( R.string.vs );
String tmp;
int ii;
for ( ii = 0; ; ) {
sb.append( String.format( "%s(%d)", players[ii].name,
summary.scores[ii] ) );
for ( int ii = 0; ; ) {
int score = null == summary.scores? 0 : summary.scores[ii];
sb.append( String.format( "%s(%d)", players[ii].name, score ) );
if ( ++ii >= nPlayers ) {
break;
}