1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-02-05 15:40:10 +00:00
elsid a0cfcc50a2
Fix dangling pointer access on clicking save in the main menu
getSignature() returns an object which means expression like:
className = it->getSignature().mPlayerClassName;
assigns a temporary object to className that does not outlive the statement.
Having className a string view such code leads to a dangling pointer.

Return a reference from getSignature to save on redundant copying.

Change getSignature implementation to make it visible that it finds a maximum
element.

Do not call getSignature multiple times when possible to avoid seaching for the
same max element multiple times.
2022-09-15 22:49:20 +02:00
..
2022-09-08 21:08:59 +02:00
2016-12-15 13:09:40 +01:00
2021-10-05 22:51:12 +02:00