REDIVIVUS

Proposals / #1349

Type the allocated inactive item record local as D2InactiveItemRecordStrc pointer

applied · by eejitgames · submitted 2026-11-06, applied 2026-11-06

Ghidra vwin 1971 · 9dc1ead

In win 00541b10, pNewInactiveRecord is int* but carries an allocated D2InactiveItemRecordStrc. Fixed fields occupy 14 bytes; sizeof(record) is 15 because itemData[1] contributes one placeholder byte. 00541b82 adds 15 to the serialized byte count; this existing allocation/copy size is preserved. Allocation at 00541b92 is saved at 00541ba0 (EBP-0x418), receives the staging-buffer copy at 00541ba6, and is reloaded into ECX at 00541c16. 00541c3a stores the previous list head to its pNext (+0); 00541c3c publishes it to pInactiveList->pInactiveItems (+8). Alternate 00541c1f publishes it through the typed out parameter. Retype only pNewInactiveRecord to D2InactiveItemRecordStrc*, replacing integer-cast list linking with typed fields. Names, parameters, storage, and allocation/copy sizes unchanged. Static verification only. Replaces #1348 solely to clarify the header-size wording; the proposed edit is identical.

Changes 1, applied together

  1. Retype variable win 0x00541b10 EAX

    typeint *→D2InactiveItemRecordStrc *