Skip to content

Commit

Permalink
HotFix, unitialized variables causing segfault after code re-organiza…
Browse files Browse the repository at this point in the history
…tion
  • Loading branch information
kroyee committed Jun 21, 2017
1 parent 3dfc406 commit 624411c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/gameplay/gameField.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ gameField::gameField(Resources& _resources) : resources(_resources), text(_resou
tile = resources.gfx.tile;

piece.piece=7;

for (int y=0; y<22; y++)
for (int x=0; x<10; x++)
square[y][x] = 0;
}

gameField::gameField(const gameField& field) : resources(field.resources), text(field.resources) {
Expand Down
2 changes: 2 additions & 0 deletions src/resources/Resources.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ bool Resources::init() {
if (loadError(sounds.loadSounds()))
return false;

gamestate = MainMenu;

sounds.setEffectVolume(options.EffectVolume);
sounds.setMusicVolume(options.MusicVolume);
sounds.setChatVolume(options.ChatVolume);
Expand Down

0 comments on commit 624411c

Please sign in to comment.