Skip to content

Commit

Permalink
Check for specific error directly
Browse files Browse the repository at this point in the history
  • Loading branch information
gingerBill committed Jul 16, 2024
1 parent fe71846 commit 8d70a26
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/os/os2/process_windows.odin
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
// Note(flysand): Make sure the buffer too small error comes out, and not any other 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
}
err = nil
Expand Down

0 comments on commit 8d70a26

Please sign in to comment.