Duplicate check of identical expression
Type
Development
Frequency
Once
Severity
S4 - Minor
Reproducibility
Always
Status
closed
Regression
No
Workaround
No
Project
src/importexport/internal/midiimport/importmidi_voice.cpp line 63:
code;
for (int i = 0; i != (int)notes.size() - 1; ++i) {
if (notes[i].offTime > notes[i].offTime) // <-- identical (probably i + 1 meant)
{
return false;
}
}
return true;
Fix version
3.6.0
Comments
That source code snippet stems from the master branch (there is no src directory in the 3.x branches)
Same line is in 3.x though, at importexport/midiimport/importmidi_voice.cpp, line 64
Quite strange that this doesn't cause any compiler warning
Code came in 6 (!) years ago via f4067835 and indeed it seems
i+1
is meant hereSee https://github.com/musescore/MuseScore/pull/7132
And https://github.com/musescore/MuseScore/pull/7135
Fixed in branch 3.x, commit e9cc4725e7
_Fix #314551: Duplicate check of identical expression
Apparently a long time bug, introduced 6 years ago in f4067835_
Fixed in branch master, commit 70fcddca1a
_Fix #314551: Duplicate check of identical expression
Apparently a long time bug, introduced 6 years ago in f406783_
now faded away :-)
Automatically closed -- issue fixed for 2 weeks with no activity.