Skip to content

Commit

Permalink
Fix #23406: Crash on copying multiple selected chord names.
Browse files Browse the repository at this point in the history
The map key used to sort by track and tick the elements to copy overflowed.
  • Loading branch information
Maurizio M. Gavioli authored and Maurizio M. Gavioli committed Nov 5, 2013
1 parent fa034c3 commit aba4f9a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions libmscore/select.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -515,7 +515,7 @@ QByteArray Selection::symbolListMimeData() const
MAPDATA mapData;
Segment* seg;
int track;
std::multimap<long, MAPDATA> map;
std::multimap<qint64, MAPDATA> map;

// scan selection element list, inserting relevant elements in a tick-sorted map
foreach (Element* e, _el) {
Expand Down Expand Up @@ -649,7 +649,7 @@ Enabling copying of more element types requires enabling pasting in Score::paste
}
mapData.e = e;
mapData.s = seg;
map.insert(std::pair<long,MAPDATA>( ((long)track << 32) + seg->tick(), mapData));
map.insert(std::pair<qint64,MAPDATA>( ((qint64)track << 32) + seg->tick(), mapData));
}

xml.stag(QString("SymbolList version=\"" MSC_VERSION "\" fromtrack=\"%1\" totrack=\"%2\"")
Expand Down

0 comments on commit aba4f9a

Please sign in to comment.