Skip to content

DEV9: Don't shadow return value of GetAdaptersAddresses (Pcap)#4960

Merged
lightningterror merged 1 commit into
PCSX2:masterfrom
TheLastRar:DEV9-VarShadow
Dec 4, 2021
Merged

DEV9: Don't shadow return value of GetAdaptersAddresses (Pcap)#4960
lightningterror merged 1 commit into
PCSX2:masterfrom
TheLastRar:DEV9-VarShadow

Conversation

@TheLastRar
Copy link
Copy Markdown
Contributor

Description of Changes

Don't shadow dwStatus in PCAPGetWin32Adapter

Rationale behind Changes

Shadowing dwStatus for the return value of GetAdaptersAddresses will prevent the return value of second call from being inspected in the following if statement

If the user had a large amount of network adapters, this would prevent the code from getting the adapter information of a the selected pcap adaptor.

The equivalent TAP adapter code is already correct.

Suggested Testing Steps

Test pcap adaptor on a system with lots of adapters installed

@github-actions github-actions Bot added the DEV9 label Oct 29, 2021
@lightningterror lightningterror merged commit 3835fc5 into PCSX2:master Dec 4, 2021
@TheLastRar TheLastRar deleted the DEV9-VarShadow branch December 4, 2021 13:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants