Panzerschrek / Chasm-Reverse

Tools for reverse-engineering of game "Chasm: The Rift"
163 stars 17 forks source link

Fixed sorting of effects sprites #23

Closed alexey-lysiuk closed 6 years ago

alexey-lysiuk commented 6 years ago

Comparison function for std::sort() violated strict weak ordering relation leading to undefined behavior Regular crashes were encountered after weapon shooting

Panzerschrek commented 6 years ago

Ok, new compare function looks correct: http://en.cppreference.com/w/cpp/concept/Compare It`s strange, but on my compiler/standard library this bug did not appear.