SetupTool: Fix updater bug
@@ -144,21 +144,17 @@ BOOLEAN SetupExtractBuild(
if (info.wProcessorArchitecture == PROCESSOR_ARCHITECTURE_AMD64)
{
- ULONG_PTR index;
-
fileName = PhConvertUtf8ToUtf16(zipFileStat.m_filename);
- if ((index = PhFindStringInString(fileName, 0, L"x64\\")) != -1)
- PhMoveReference(&fileName, PhSubstring(fileName, index, (fileName->Length / 2) - index));
+ if (PhFindStringInString(fileName, 0, L"x64\\") != -1)
+ PhMoveReference(&fileName, PhSubstring(fileName, 4, (fileName->Length / 2) - 4));
}
else
{
- ULONG_PTR index;
-
fileName = PhConvertUtf8ToUtf16(zipFileStat.m_filename);
- if ((index = PhFindStringInString(fileName, 0, L"x32\\")) != -1)
- PhMoveReference(&fileName, PhSubstring(fileName, index, (fileName->Length / 2) - index));
+ if (PhFindStringInString(fileName, 0, L"x32\\") != -1)
+ PhMoveReference(&fileName, PhSubstring(fileName, 4, (fileName->Length / 2) - 4));
}
extractPath = PhConcatStrings(3, PhGetString(SetupInstallPath), L"\\", PhGetString(fileName));
