diff options
author | Martin Kiewitz | 2016-01-18 21:52:48 +0100 |
---|---|---|
committer | Martin Kiewitz | 2016-01-18 21:52:48 +0100 |
commit | 1084c22a786f1d8a0215c1bb3e676f05f948162c (patch) | |
tree | 2b275384c674723288f5152c011d64c2fbfa06a8 /engines/agi/sound_2gs.h | |
parent | 84eca2f5b0884414f8fb422c3919fca1a5683ee9 (diff) | |
download | scummvm-rg350-1084c22a786f1d8a0215c1bb3e676f05f948162c.tar.gz scummvm-rg350-1084c22a786f1d8a0215c1bb3e676f05f948162c.tar.bz2 scummvm-rg350-1084c22a786f1d8a0215c1bb3e676f05f948162c.zip |
AGI: fix Apple IIgs sound code + cleanup
fixes several crash possibilities
including uninitialized .chn
Diffstat (limited to 'engines/agi/sound_2gs.h')
-rw-r--r-- | engines/agi/sound_2gs.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/engines/agi/sound_2gs.h b/engines/agi/sound_2gs.h index 8a1999c8eb..4eaba528cc 100644 --- a/engines/agi/sound_2gs.h +++ b/engines/agi/sound_2gs.h @@ -122,7 +122,11 @@ struct IIgsSampleHeader { class IIgsGenerator { public: - IIgsGenerator() : ins(NULL), key(-1), chn(-1) {} + IIgsGenerator() : ins(NULL), key(-1), chn(-1) { + memset(&osc, 0, sizeof(osc)); + seg = 0; + a = 0; + } const IIgsInstrumentHeader *ins; ///< Currently used instrument int key; ///< MIDI key |