diff options
author | Wohlstand <admin@wohlnet.ru> | 2024-06-26 12:51:56 +0300 |
---|---|---|
committer | Wohlstand <admin@wohlnet.ru> | 2024-06-26 12:51:56 +0300 |
commit | 5cce67a4b4d59ff1c75697a64e25ac8f5625d87d (patch) | |
tree | db7e77d73247f100ac682d229c5e5ecd1b360f4d /src | |
parent | 8ea0409fdec8aea3933f5567f3d120a3101a9510 (diff) | |
download | libADLMIDI-5cce67a4b4d59ff1c75697a64e25ac8f5625d87d.tar.gz libADLMIDI-5cce67a4b4d59ff1c75697a64e25ac8f5625d87d.tar.bz2 libADLMIDI-5cce67a4b4d59ff1c75697a64e25ac8f5625d87d.zip |
Fix loopsCount used uninitialized in LoopState::reset()
Done by @noisecode3: https://github.com/Wohlstand/libOPNMIDI/commit/5767f32630ef22ae43f00d650793b6606823c8b0
Diffstat (limited to 'src')
-rw-r--r-- | src/midi_sequencer.hpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/midi_sequencer.hpp b/src/midi_sequencer.hpp index e6e9983..2c02fc9 100644 --- a/src/midi_sequencer.hpp +++ b/src/midi_sequencer.hpp @@ -457,6 +457,13 @@ private: //! Current level on the loop stack (<0 - out of loop, 0++ - the index in the loop stack) int stackLevel; + //! Constructor to initialize member variables + LoopState() + : caughtStart(false), caughtEnd(false), caughtStackStart(false), + caughtStackEnd(false), caughtStackBreak(false), skipStackStart(false), + invalidLoop(false), temporaryBroken(false), loopsCount(-1), loopsLeft(0), + stackLevel(-1) + {} /** * @brief Reset loop state to initial */ |