DEV9: Correct type used to store GetDelta result

Also relocate call
This commit is contained in:
TheLastRar 2024-04-12 15:59:06 +01:00 committed by Connor McLaughlin
parent 1e094096c2
commit bdd0f7e2f4
1 changed files with 5 additions and 4 deletions

View File

@ -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)
{
@ -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);
@ -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;