win32: LoadLibraryEx_Flags off-by-one

bit_set without a backing type counts bits from the enum's lowest value (141299eb02)
in this case it causes an off-by-one offset, so flags fall down to the one below. I experienced `LOAD_LIBRARY_SEARCH_DLL_LOAD_DIR` -> `LOAD_LIBRARY_REQUIRE_SIGNED_TARGET`, for instance, so unsigned DLLs wouldn't load. aw.
fix is adding a dword backing type to the bit flags, like the other types in this file
This commit is contained in:
connnnal
2026-07-29 12:08:29 +01:00
parent 610e2c5161
commit c380c0d87e

View File

@@ -3538,7 +3538,7 @@ LoadLibraryEx_Flag :: enum DWORD {
LOAD_LIBRARY_SEARCH_DEFAULT_DIRS = 12, // 1 << 12: 0x1000,
LOAD_LIBRARY_SAFE_CURRENT_DIRS = 13, // 1 << 13: 0x2000,
}
LoadLibraryEx_Flags :: distinct bit_set[LoadLibraryEx_Flag]
LoadLibraryEx_Flags :: distinct bit_set[LoadLibraryEx_Flag; DWORD]
// https://docs.microsoft.com/en-us/windows/win32/api/winnt/ns-winnt-quota_limits
// Used in LogonUserExW