Skip to content

Commit

Permalink
Fix GH#16847: Prevent negative spanners
Browse files Browse the repository at this point in the history
Backport of musescore#16929
  • Loading branch information
asattely authored and Jojo-Schmitz committed Mar 21, 2023
1 parent 8a11fca commit 83253d3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libmscore/spanner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -944,7 +944,7 @@ void Spanner::setEndElement(Element* e)
#endif
_endElement = e;
if (e && ticks() == Fraction() && _tick >= Fraction())
setTicks(e->tick() - _tick);
setTicks(std::max(e->tick() - _tick, Fraction()));
}

//---------------------------------------------------------
Expand Down

0 comments on commit 83253d3

Please sign in to comment.