Skip to content

Commit

Permalink
Fix warning: dangling pointer (construct string_view from temporary s…
Browse files Browse the repository at this point in the history
…tring)
  • Loading branch information
Megamouse committed Jun 26, 2024
1 parent 7b0ec64 commit d6ca3cd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion rpcs3/Emu/Cell/lv2/sys_prx.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
#include "sys_memory.h"
#include <span>

extern void dump_executable(std::span<const u8> data, ppu_module* _main, std::string_view title_id);
extern void dump_executable(std::span<const u8> data, const ppu_module* module, std::string_view title_id);

extern std::shared_ptr<lv2_prx> ppu_load_prx(const ppu_prx_object&, bool virtual_load, const std::string&, s64, utils::serial* = nullptr);
extern void ppu_unload_prx(const lv2_prx& prx);
Expand Down
4 changes: 2 additions & 2 deletions rpcs3/Emu/System.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -301,9 +301,9 @@ static void fixup_settings(const psf::registry* _psf)
}
}

extern void dump_executable(std::span<const u8> data, ppu_module* _module, std::string_view title_id)
extern void dump_executable(std::span<const u8> data, const ppu_module* _module, std::string_view title_id)
{
const std::string_view filename = _module->path.substr(_module->path.find_last_of('/') + 1);
const std::string filename = _module->path.substr(_module->path.find_last_of('/') + 1);

// Format filename and directory name
// Make each directory for each file so tools like IDA can work on it cleanly
Expand Down

0 comments on commit d6ca3cd

Please sign in to comment.