state: Fix assertion errors
This commit is contained in:
parent
025d5af907
commit
8fdf5a2cdb
@ -77,8 +77,9 @@ public class State {
|
||||
islandcount++;
|
||||
// Add the island to the array
|
||||
Island[] tmpislands = new Island[islandcount];
|
||||
assert islands != null;
|
||||
if (islands != null) {
|
||||
System.arraycopy(islands, 0, tmpislands, 0, tmpislands.length - 1);
|
||||
}
|
||||
tmpislands[islandcount-1] = tmpIsland;
|
||||
islands = tmpislands;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user