mirror of https://github.com/PCSX2/pcsx2.git
DEV9: Fix typo in DHCP_Packet
This commit is contained in:
parent
f4b2e0dd7a
commit
fef2952d47
|
@ -494,7 +494,7 @@ namespace InternalServers
|
|||
retPay->options.push_back(new DHCPopSERVIP(NetAdapter::internalIP));
|
||||
retPay->options.push_back(new DHCPopEND());
|
||||
|
||||
retPay->maxLenth = maxMs;
|
||||
retPay->maxLength = maxMs;
|
||||
UDP_Packet* retUdp = new UDP_Packet(retPay);
|
||||
retUdp->sourcePort = 67;
|
||||
retUdp->destinationPort = 68;
|
||||
|
|
|
@ -154,7 +154,7 @@ namespace PacketReader::IP::UDP::DHCP
|
|||
|
||||
int DHCP_Packet::GetLength()
|
||||
{
|
||||
return maxLenth - (8 + 20);
|
||||
return maxLength - (8 + 20);
|
||||
}
|
||||
|
||||
void DHCP_Packet::WriteBytes(u8* buffer, int* offset)
|
||||
|
@ -185,7 +185,7 @@ namespace PacketReader::IP::UDP::DHCP
|
|||
int len = 240;
|
||||
for (size_t i = 0; i < options.size(); i++)
|
||||
{
|
||||
if (len + options[i]->GetLength() < maxLenth)
|
||||
if (len + options[i]->GetLength() < maxLength)
|
||||
{
|
||||
len += options[i]->GetLength();
|
||||
options[i]->WriteBytes(buffer, offset);
|
||||
|
@ -194,7 +194,7 @@ namespace PacketReader::IP::UDP::DHCP
|
|||
{
|
||||
Console.Error("DEV9: DHCP_Packet: Oversized DHCP packet not handled");
|
||||
//We need space for DHCP End
|
||||
if (len == maxLenth)
|
||||
if (len == maxLength)
|
||||
{
|
||||
i -= 1;
|
||||
int pastLength = options[i]->GetLength();
|
||||
|
|
|
@ -42,7 +42,7 @@ namespace PacketReader::IP::UDP::DHCP
|
|||
std::vector<BaseOption*> options;
|
||||
|
||||
//used by GetLength & WriteBytes
|
||||
int maxLenth = 576;
|
||||
int maxLength = 576;
|
||||
|
||||
DHCP_Packet() {}
|
||||
DHCP_Packet(u8* buffer, int bufferSize);
|
||||
|
|
Loading…
Reference in New Issue