Skip to content

Commit

Permalink
Fix save game system not saving arrays of EHANDLEs if the first half …
Browse files Browse the repository at this point in the history
…of the array contains null handles.

Same as twhl-community/halflife-updated@d5d96d3.
  • Loading branch information
nekonomicon committed Feb 18, 2024
1 parent c7b141d commit f58544a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion dlls/util.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2223,7 +2223,7 @@ int CRestore::ReadField( void *pBaseData, TYPEDESCRIPTION *pFields, int fieldCou
break;
case FIELD_EHANDLE:
// Input and Output sizes are different!
pOutputData = (char *)pOutputData + j * ( sizeof(EHANDLE) - gSizes[pTest->fieldType] );
pInputData = (char*)pData + j * gSizes[pTest->fieldType];
entityIndex = *(int *)pInputData;
pent = EntityFromIndex( entityIndex );
if( pent )
Expand Down

0 comments on commit f58544a

Please sign in to comment.