Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/main/java/com/glaurung/batMap/gui/RoomColors.java
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public static int getIndex( Color color ) {
} else if (color.equals( IVORY )) {
return 9;
} else {
return 1000;
return 0; // Unsupported color, default to 0 (instead of previously value 1000 which caused out of bounds exception in rare occasions).
}

}
Expand Down
2 changes: 2 additions & 0 deletions src/main/java/com/glaurung/batMap/gui/search/SearchPanel.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import java.awt.event.ItemListener;
import java.io.IOException;
import java.util.Collection;
import java.util.Collections;
import java.util.LinkedList;
import java.util.List;

Expand Down Expand Up @@ -124,6 +125,7 @@ private void populateAreaList() {
listAllModel.removeAllElements();
listAllModel.addElement( new AreaListItem( new Room( "Area", "first slot placeholder", new Area( "Areas list" ) ) ) );
List<String> areas = AreaDataPersister.listAreaNames( this.engine.getBaseDir() );
Collections.sort( areas, String.CASE_INSENSITIVE_ORDER );
try {
for (String areaName : areas) {
AreaSaveObject aso = AreaDataPersister.loadData( this.engine.getBaseDir(), areaName );
Expand Down