mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-08-04 16:32:39 +00:00
fix dangling pointer?
fixes the warning: "clang-diagnostic-dangling-gls: object backing the pointer will be destroyed at the end of the full-expression"
This commit is contained in:
parent
cba79b8359
commit
d80ae108d6
@ -423,7 +423,8 @@ void PatchMemory(std::string modNameStr, std::string offsetStr, std::string valu
|
||||
std::vector<u8> payload;
|
||||
for (size_t i = 0; i < valueStr.length(); i += 2) {
|
||||
|
||||
const char* byteStr = valueStr.substr(i, 2).c_str();
|
||||
std::string tempStr = valueStr.substr(i, 2);
|
||||
const char* byteStr = tempStr.c_str();
|
||||
char* endPtr;
|
||||
unsigned int byteVal = std::strtoul(byteStr, &endPtr, 16);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user