REDIVIVUS

Proposals / #953

Mac D2COMP_ValidateEquippedItemForClass: __fastcc void (int32_t nEquipSlot, uint8_t * pItemIndex)

applied · by KierTaylor · submitted 2026-11-02, applied 2026-11-02

Ghidra vmac 111 · 3c6740e

Mac body: ECX is saved and range-checked as 1..4 (the equipment slot); EDX (ESI) is dereferenced as a byte (item index, must be >= 4) and later overwritten with a fallback index when the item does not suit the class; no stack arguments are read anywhere in the function and it ends with a plain RET. Windows twin D2COMP_ValidateEquippedItemForClass 0x00504d60 is void (int32_t nEquipSlot, byte * pbyItemIndex); same order on Mac. (The pby prefix is refused by the naming check, so pItemIndex.)

Changes 1, applied together

  1. Set prototype mac 0x00041752

    signatureundefined D2COMP_ValidateEquippedItemForClass(void)→void D2COMP_ValidateEquippedItemForClass(int32_t nEquipSlot, uint8_t * pItemIndex)
    conventionunknown→__fastcc