File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -54,14 +54,14 @@ void ASMPatchFixLoadingNullItemsFromXml() {
5454
5555 ASMPatch::SavedRegisters savedRegisters (ASMPatch::SavedRegisters::Registers::GP_REGISTERS_STACKLESS, true );
5656 ASMPatch patch;
57- patch.AddBytes (ByteBuffer ().AddAny ((char *)addr, 0x5 )) // Restore the commands we overwrote
58- .PreserveRegisters (savedRegisters)
57+ patch.PreserveRegisters (savedRegisters)
5958 .Push (ASMPatch::Registers::EDI) // Push the newly created ItemConfig_Item
6059 .AddInternalCall (FixLoadingNullItemFromXml)
6160 .AddBytes (" \x84\xC0 " ) // test al, al
6261 .RestoreRegisters (savedRegisters)
63- .AddConditionalRelativeJump (ASMPatcher::CondJumps::JE, (char *)addr + 0x5 ) // Jump for false (no new entry was added, continue as normal)
64- .AddRelativeJump ((char *)addr + 0x2B ); // Jump for true (new entry was added, skip some internal code)
62+ .AddConditionalRelativeJump (ASMPatcher::CondJumps::JNZ, (char *)addr + 0x2B ) // Jump for true (new entry was added, skip some internal code)
63+ .AddBytes (ByteBuffer ().AddAny ((char *)addr, 0x5 )) // Restore the commands we overwrote
64+ .AddRelativeJump ((char *)addr + 0x5 ); // Jump for false (no new entry was added, continue as normal)
6565 sASMPatcher .PatchAt (addr, &patch);
6666}
6767
You can’t perform that action at this time.
0 commit comments