Commit 04b4dd02 authored by Aric Stewart's avatar Aric Stewart Committed by Alexandre Julliard

iphlpapi: Correct GetBestRoute when there is no route.

parent 62f40225
...@@ -854,7 +854,7 @@ DWORD WINAPI GetBestRoute(DWORD dwDestAddr, DWORD dwSourceAddr, PMIB_IPFORWARDRO ...@@ -854,7 +854,7 @@ DWORD WINAPI GetBestRoute(DWORD dwDestAddr, DWORD dwSourceAddr, PMIB_IPFORWARDRO
ret = AllocateAndGetIpForwardTableFromStack(&table, FALSE, GetProcessHeap(), 0); ret = AllocateAndGetIpForwardTableFromStack(&table, FALSE, GetProcessHeap(), 0);
if (table && !ret) { if (table && !ret) {
DWORD ndx, matchedBits, matchedNdx = 0; DWORD ndx, matchedBits, matchedNdx = table->dwNumEntries;
for (ndx = 0, matchedBits = 0; ndx < table->dwNumEntries; ndx++) { for (ndx = 0, matchedBits = 0; ndx < table->dwNumEntries; ndx++) {
if (table->table[ndx].dwForwardType != MIB_IPROUTE_TYPE_INVALID && if (table->table[ndx].dwForwardType != MIB_IPROUTE_TYPE_INVALID &&
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment