iphlpapi: Correct GetBestRoute when there is no route.

This commit is contained in:
Aric Stewart 2007-10-24 14:47:42 -05:00 committed by Alexandre Julliard
parent 62f4022563
commit 04b4dd0227
1 changed files with 1 additions and 1 deletions

View File

@ -854,7 +854,7 @@ DWORD WINAPI GetBestRoute(DWORD dwDestAddr, DWORD dwSourceAddr, PMIB_IPFORWARDRO
ret = AllocateAndGetIpForwardTableFromStack(&table, FALSE, GetProcessHeap(), 0);
if (table && !ret) {
DWORD ndx, matchedBits, matchedNdx = 0;
DWORD ndx, matchedBits, matchedNdx = table->dwNumEntries;
for (ndx = 0, matchedBits = 0; ndx < table->dwNumEntries; ndx++) {
if (table->table[ndx].dwForwardType != MIB_IPROUTE_TYPE_INVALID &&