Permalink
Browse files

front: Fix RomDetail values if fields not present.

  • Loading branch information...
littleguy77 committed Jan 6, 2015
1 parent 62a9ffa commit c7fb2b34ba3beff34c972a14cf28846bd8b21dfb
Showing with 3 additions and 2 deletions.
  1. +3 −2 src/paulscode/android/mupen64plusae/util/RomDatabase.java
@@ -176,9 +176,10 @@ private RomDetail( ConfigSection section )
saveType = section.get( "SaveType" );
String statusString = section.get( "Status" );
String playersString = section.get( "Players" );
+ String rumbleString = section.get( "Rumble" );
status = TextUtils.isEmpty( statusString ) ? 0 : Integer.parseInt( statusString );
- players = TextUtils.isEmpty( playersString ) ? 0 : Integer.parseInt( playersString );
- rumble = "Yes".equals( section.get( "Rumble" ) );
+ players = TextUtils.isEmpty( playersString ) ? 4 : Integer.parseInt( playersString );
+ rumble = TextUtils.isEmpty( rumbleString ) ? true : "Yes".equals( rumbleString );
}
else
{

0 comments on commit c7fb2b3

Please sign in to comment.