Skip to content

Commit 319d16b

Browse files
committed
Allow 128th as the shortest actual measure duration
and report an error rather than crash if the score has something shorter See musescore#8890 and musescore#8893, backport of musescore#8894, part 1
1 parent ad4a4d2 commit 319d16b

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

libmscore/measure.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2022,7 +2022,7 @@ void Measure::read(XmlReader& e, int staffIdx)
20222022
else
20232023
qDebug("illegal measure size <%s>", qPrintable(e.attribute("len")));
20242024
irregular = true;
2025-
if (_len.numerator() <= 0 || _len.denominator() <= 0) {
2025+
if (_len.numerator() <= 0 || _len.denominator() <= 0 || _len.denominator() > 128) {
20262026
e.raiseError(QObject::tr("MSCX error at line %1: invalid measure length: %2").arg(e.lineNumber()).arg(_len.toString()));
20272027
return;
20282028
}

mscore/measureproperties.ui

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -214,6 +214,11 @@
214214
<string>64</string>
215215
</property>
216216
</item>
217+
<item>
218+
<property name="text">
219+
<string>128</string>
220+
</property>
221+
</item>
217222
</widget>
218223
</item>
219224
<item row="0" column="4" colspan="2">

0 commit comments

Comments
 (0)