You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Rejected snapshot can remain in delta history and still emit events #10
In src/bot/netPatch.ts, the patched snapshot decoder creates/fills held[recvTick] and collects snapshot events before validating WantedCrc.
On CRC mismatch it restores this.deltas, but the new held[recvTick] entry is not removed. The collected events are also emitted after the CRC check regardless of whether the snapshot was rejected.
User effect
A corrupt/rejected snapshot can:
become a base for later delta snapshots and cause follow-up CRC failures/state corruption;
emit events such as death/spawn/hammerhit even though that snapshot failed validation.
Expected
If CRC validation fails:
discard the just-created held[recvTick] state;
do not emit events from the rejected snapshot;
only commit history/events after CRC succeeds.
Test
Feed a delta snapshot with an intentionally wrong CRC followed by a valid delta based on the previous accepted snapshot. Verify no rejected events fire and the valid follow-up does not inherit rejected state.
Activity