Skip to content

Commit

Permalink
Fixed possible wave crash
Browse files Browse the repository at this point in the history
  • Loading branch information
Anuken committed Apr 1, 2018
1 parent 0936fc6 commit 528cb6b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/src/io/anuke/mindustry/core/Control.java
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ public int getX(int pointer) {
Events.on(WaveEvent.class, () -> {
Sounds.play("spawn");

int last = Settings.getInt("hiscore" + world.getMap().name);
int last = Settings.getInt("hiscore" + world.getMap().name, 0);

if(state.wave > last && !state.mode.infiniteResources && !state.mode.disableWaveTimer){
Settings.putInt("hiscore" + world.getMap().name, state.wave);
Expand Down

0 comments on commit 528cb6b

Please sign in to comment.