aboutsummaryrefslogtreecommitdiff
path: root/sound
diff options
context:
space:
mode:
Diffstat (limited to 'sound')
-rw-r--r--sound/midiparser_xmidi.cpp6
1 files changed, 1 insertions, 5 deletions
diff --git a/sound/midiparser_xmidi.cpp b/sound/midiparser_xmidi.cpp
index 3ee08ccb7d..9ad5bfafb9 100644
--- a/sound/midiparser_xmidi.cpp
+++ b/sound/midiparser_xmidi.cpp
@@ -51,11 +51,7 @@ public:
// This is a special XMIDI variable length quantity
uint32 MidiParser_XMIDI::readVLQ2(byte * &pos) {
uint32 value = 0;
- int i;
-
- for (i = 0; i < 4; ++i) {
- if (pos[0] & 0x80)
- break;
+ while (!(pos[0] & 0x80)) {
value += *pos++;
}
return value;