mirror of
https://github.com/odin-lang/Odin.git
synced 2026-08-02 12:18:55 +00:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user