Browse Source

Check for specific error directly

gingerBill 1 year ago
parent
commit
8d70a264ab
1 changed files with 1 additions and 1 deletions
  1. 1 1
      core/os/os2/process_windows.odin

+ 1 - 1
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