From 8d70a264ab547f3d3bc66501921cf14884987689 Mon Sep 17 00:00:00 2001 From: gingerBill Date: Tue, 16 Jul 2024 12:21:55 +0100 Subject: [PATCH] Check for specific error directly --- core/os/os2/process_windows.odin | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/os/os2/process_windows.odin b/core/os/os2/process_windows.odin index 4cdf215ed..8d61e7be7 100644 --- a/core/os/os2/process_windows.odin +++ b/core/os/os2/process_windows.odin @@ -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