diff options
| author | Amon Neander <138429719+MaverickAmon02@users.noreply.github.com> | 2026-06-19 07:40:59 -0700 |
|---|---|---|
| committer | Amon Neander <138429719+MaverickAmon02@users.noreply.github.com> | 2026-06-19 07:40:59 -0700 |
| commit | 5797b943b250bf3ec0dce258bb210ca9b1d57c28 (patch) | |
| tree | 87f31fad1c38257b294b4ac0393b71651d6504d0 /Source/Core | |
| parent | 43210d14309b2028cc045fae695c879ef26c9ce5 (diff) | |
State: Fix Use After Move In LoadAsFromCore
This use-after-move error inhibits the use of savestates during the Dolphin TAS Movie creation process.
Diffstat (limited to 'Source/Core')
| -rw-r--r-- | Source/Core/Core/State.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Source/Core/Core/State.cpp b/Source/Core/Core/State.cpp index 5724240ffd..ddd52f1d56 100644 --- a/Source/Core/Core/State.cpp +++ b/Source/Core/Core/State.cpp @@ -15,6 +15,7 @@ #include <fmt/chrono.h> #include <fmt/format.h> +#include <fmt/std.h> #include <lz4.h> #include <lzo/lzo1x.h> @@ -463,7 +464,7 @@ static void CompressAndDumpState(Core::System& system, const CompressAndDumpStat else { const std::filesystem::path temp_path(filename); - Core::DisplayMessage(fmt::format("Saved State to {}", temp_path.filename().string()), 2000); + Core::DisplayMessage(fmt::format("Saved State to {}", temp_path.filename()), 2000); } } @@ -840,9 +841,8 @@ static void LoadAsFromCore(Core::System& system, std::string filename) { if (loaded_successfully) { - std::filesystem::path temp_filename(std::move(filename)); - Core::DisplayMessage(fmt::format("Loaded State from {}", temp_filename.filename().string()), - 2000); + const std::filesystem::path temp_filename(filename); + Core::DisplayMessage(fmt::format("Loaded State from {}", temp_filename.filename()), 2000); if (File::Exists(filename + ".dtm")) { movie.LoadInput(filename + ".dtm"); |
