mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-06 15:48:51 +00:00
Check for specific error directly
This commit is contained in:
@@ -550,7 +550,7 @@ _get_process_user :: proc(process_handle: win32.HANDLE, allocator: runtime.Alloc
|
|||||||
if !win32.GetTokenInformation(token_handle, .TokenUser, nil, 0, &token_user_size) {
|
if !win32.GetTokenInformation(token_handle, .TokenUser, nil, 0, &token_user_size) {
|
||||||
// Note(flysand): Make sure the buffer too small error comes out, and not any other error
|
// Note(flysand): Make sure the buffer too small error comes out, and not any other error
|
||||||
err = _get_platform_error()
|
err = _get_platform_error()
|
||||||
if v, ok := err.(Platform_Error); !ok || int(v) != 0x7a {
|
if v, ok := is_platform_error(err); !ok || v != i32(win32.ERROR_INSUFFICIENT_BUFFER) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
err = nil
|
err = nil
|
||||||
|
|||||||
Reference in New Issue
Block a user