mirror of
https://github.com/stenzek/duckstation.git
synced 2026-07-08 17:46:19 +00:00
Cheats: Use .org as insertion point in assembly codes
This commit is contained in:
@@ -4631,7 +4631,7 @@ std::unique_ptr<Cheats::AssemblyCheatCode> Cheats::AssemblyCheatCode::Parse(Meta
|
||||
if (linev.empty())
|
||||
continue;
|
||||
|
||||
if (linev.back() == ':')
|
||||
if (linev.starts_with(".org "))
|
||||
{
|
||||
if (pc.has_value() && !section_has_instruction)
|
||||
{
|
||||
@@ -4639,7 +4639,7 @@ std::unique_ptr<Cheats::AssemblyCheatCode> Cheats::AssemblyCheatCode::Parse(Meta
|
||||
return {};
|
||||
}
|
||||
|
||||
std::string_view address_text = StringUtil::StripWhitespace(linev.substr(0, linev.size() - 1));
|
||||
std::string_view address_text = StringUtil::StripWhitespace(linev.substr(4));
|
||||
if (address_text.starts_with("0x") || address_text.starts_with("0X"))
|
||||
address_text.remove_prefix(2);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user