Skip to content

Commit

Permalink
Fix an issue with IsSupported function in the 64-bit version
Browse files Browse the repository at this point in the history
  • Loading branch information
sincos2854 committed Aug 13, 2024
1 parent f81726b commit 9370380
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion spi00in.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ int __stdcall IsSupportedW(LPCWSTR filename, DWORD_PTR dw)
LPBYTE data = nullptr;
DWORD read_size = 0;

if ((dw & 0xFFFF0000) == 0)
if ((dw & static_cast<DWORD_PTR>(-1) - 0xFFFF) == 0)
{
buf = std::make_unique_for_overwrite<BYTE[]>(BUF_SIZE_HEADER);
if (!ReadFile(reinterpret_cast<HANDLE>(dw), buf.get(), BUF_SIZE_HEADER, &read_size, NULL))
Expand Down

0 comments on commit 9370380

Please sign in to comment.