Skip to content

Commit 017df70

Browse files
committed
Merge branch 'master' of https://github.com/sfall-team/sfall into better-docs
2 parents ff07c1c + a156f84 commit 017df70

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

sfall/Modules/Inventory.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -348,11 +348,11 @@ static __declspec(naked) void item_identical_hack() {
348348
static const DWORD item_identical_End = 0x477AD5;
349349
using namespace fo;
350350
__asm { // edx - inv_item.inventory, edi - place_item.inventory
351-
pop ebx; // ret addr
352351
cmp dword ptr [eax + 0x20], item_type_weapon;
353352
je isWeapon;
354353
cmp dword ptr [eax + 0x20], item_type_ammo; // overwritten engine code
355354
jne skip;
355+
add esp, 4;
356356
jmp item_identical_Ret;
357357
isWeapon:
358358
mov ecx, [edx + 0xC]; // inv_item.miscFlags
@@ -362,9 +362,10 @@ static __declspec(naked) void item_identical_hack() {
362362
jg skip;
363363
cmp dword ptr [edi + 0x10], 0; // place_item.charges
364364
jg skip;
365+
add esp, 4;
365366
jmp item_identical_End; // return true
366367
skip:
367-
jmp ebx; // check caps pid
368+
retn; // check caps pid
368369
}
369370
}
370371

0 commit comments

Comments
 (0)