Module: wine Branch: master Commit: 04b4dd02272b39c1f18d5bc814dd1cbc8a1e4d2d URL: http://source.winehq.org/git/wine.git/?a=commit;h=04b4dd02272b39c1f18d5bc814...
Author: Aric Stewart aric@codeweavers.com Date: Wed Oct 24 14:47:42 2007 -0500
iphlpapi: Correct GetBestRoute when there is no route.
---
dlls/iphlpapi/iphlpapi_main.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/dlls/iphlpapi/iphlpapi_main.c b/dlls/iphlpapi/iphlpapi_main.c index 96e16bf..74fa938 100644 --- a/dlls/iphlpapi/iphlpapi_main.c +++ b/dlls/iphlpapi/iphlpapi_main.c @@ -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 &&