Skip to content

Commit

Permalink
DEV9: Correct type used to store GetDelta result
Browse files Browse the repository at this point in the history
Also relocate call
  • Loading branch information
TheLastRar authored and stenzek committed Apr 21, 2024
1 parent 1e09409 commit bdd0f7e
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions pcsx2/DEV9/Sessions/TCP_Session/TCP_Session_Out.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -308,9 +308,6 @@ namespace Sessions
windowSize.store(tcp->windowSize << windowScale);

const NumCheckResult Result = CheckNumbers(tcp);
//Check if we already have some of the data sent
const uint delta = GetDelta(expectedSeqNumber, tcp->sequenceNumber);
pxAssert(delta >= 0);

if (Result == NumCheckResult::Bad)
{
Expand All @@ -320,6 +317,9 @@ namespace Sessions
}
if (tcp->GetPayload()->GetLength() != 0)
{
//Check if we already have sent some of this data
const int delta = GetDelta(expectedSeqNumber, tcp->sequenceNumber);
pxAssert(delta >= 0);
//if (Result == NumCheckResult::OldSeq)
//{
// DevCon.WriteLn("[PS2] New Data Offset: %d bytes", delta);
Expand Down Expand Up @@ -486,7 +486,8 @@ namespace Sessions
}
if (tcp->GetPayload()->GetLength() > 0)
{
uint delta = GetDelta(expectedSeqNumber, tcp->sequenceNumber);
const int delta = GetDelta(expectedSeqNumber, tcp->sequenceNumber);
pxAssert(delta >= 0);
//Check if packet contains only old data
if (delta >= tcp->GetPayload()->GetLength())
return false;
Expand Down

0 comments on commit bdd0f7e

Please sign in to comment.