mirror of
https://github.com/openai/codex.git
synced 2026-09-14 11:57:03 +00:00
fix handle type.
This commit is contained in:
@@ -596,7 +596,9 @@ mod imp {
|
||||
fn query_console_snapshot() -> Option<ConsoleSnapshot> {
|
||||
unsafe {
|
||||
let handle = GetStdHandle(STD_OUTPUT_HANDLE);
|
||||
if handle.is_null() || handle == INVALID_HANDLE_VALUE {
|
||||
// `HANDLE` is an `isize`, so compare against 0 explicitly instead of treating
|
||||
// it like a raw pointer when verifying the console handle succeeded.
|
||||
if handle == 0 || handle == INVALID_HANDLE_VALUE {
|
||||
return None;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user