HRESULT_FROM_WIN32 correction

This commit is contained in:
Vincent Billet committed 2025-05-26 08:52:46 +02:00
1 parent bb274ab512
commit 9b7bb9290e
2 files changed
+2 -2

No files matched your search

+1 -1
View File
@@ -275,7 +275,7 @@ MAKE_HRESULT :: #force_inline proc "contextless" (#any_int sev: int, #any_int fa
}
HRESULT_FROM_WIN32 :: #force_inline proc "contextless" (#any_int code: int) -> HRESULT {
return HRESULT(code) <= 0 ? HRESULT(code) : HRESULT((code & 0x0000FFFF) | (int(FACILITY.WIN32) << 16) | 0x80000000)
return HRESULT(code) <= 0 ? HRESULT(code) : HRESULT(uint(code & 0x0000FFFF) | (uint(FACILITY.WIN32) << 16) | 0x80000000)
}
DECODE_HRESULT :: #force_inline proc "contextless" (#any_int hr: int) -> (SEVERITY, FACILITY, int) {