diff --git a/src/CommonLib/hostfxr_utility.cpp b/src/CommonLib/hostfxr_utility.cpp index d346f7044c..9e2c1a0e31 100644 --- a/src/CommonLib/hostfxr_utility.cpp +++ b/src/CommonLib/hostfxr_utility.cpp @@ -616,7 +616,7 @@ HOSTFXR_UTILITY::FindDotnetExePath( { goto Finished; } - prevIndex = index; + prevIndex = index + 1; if (GetBinaryTypeW(struDotnetSubstring.QueryStr(), &dwBinaryType) && fIsCurrentProcess64Bit == (dwBinaryType == SCS_64BIT_BINARY)) {