Skip to content

Commit

Permalink
protect client logic from broken packets
Browse files Browse the repository at this point in the history
  • Loading branch information
RevenantX committed Jan 27, 2025
1 parent 3d0ff4e commit 9f647e8
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions LiteEntitySystem/Internal/ServerStateData.cs
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,10 @@ public unsafe void Preload(InternalEntity[] entityDict)
ReadRPCs(rawData, ref stateReaderOffset, new EntitySharedReference(entity.Id, entity.Version), classData);

if (stateReaderOffset != initialReaderPosition + totalSize)
{
Logger.LogError($"Missread! {stateReaderOffset} > {initialReaderPosition + totalSize}");
return;
}
}
}

Expand Down

0 comments on commit 9f647e8

Please sign in to comment.