1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-02-06 22:45:38 +00:00
openmw/apps
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
..
benchmarks Use version instead of generation and revision for recast mesh 2022-09-06 21:51:48 +02:00
bsatool Use raw string literals to format command usage messages 2022-09-12 21:00:51 +02:00
bulletobjecttool Avoid chained operator() calls to prevent formatting issues 2022-09-12 16:48:15 +02:00
esmtool Dump NIFZ and KFFZ sub records by esmtool 2022-09-15 00:01:40 +02:00
essimporter Use raw string literals to format command usage messages 2022-09-12 21:00:51 +02:00
launcher Do not wrap emit expresison with parenthesis 2022-09-12 21:00:51 +02:00
mwiniimporter Avoid chained operator() calls to prevent formatting issues 2022-09-12 16:48:15 +02:00
navmeshtool Avoid chained operator() calls to prevent formatting issues 2022-09-12 16:48:15 +02:00
niftest Use raw string literals to format command usage messages 2022-09-12 21:00:51 +02:00
opencs Add comma to the last array element to prevent putting multiple elements on a single line 2022-09-14 00:36:02 +02:00
openmw Fix dangling pointer access on clicking save in the main menu 2022-09-15 22:49:20 +02:00
openmw_test_suite Add comments to prevent line splitting on formatting 2022-09-12 21:00:51 +02:00
wizard Added dedicated functions for conversions between QString and std::filesystem::path. 2022-09-11 14:41:21 +02:00
doc.hpp