Merge pull request #4003 from YohDeadfall/windows-shim-typo

Fixed a typo in the GetThreadDescription shim
This commit is contained in:
Ben Kimock 2024-10-31 00:46:44 +00:00 committed by GitHub
commit 445a340af3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -523,7 +523,7 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
let thread = match Handle::from_scalar(handle, this)? {
Some(Handle::Thread(thread)) => thread,
Some(Handle::Pseudo(PseudoHandle::CurrentThread)) => this.active_thread(),
_ => this.invalid_handle("SetThreadDescription")?,
_ => this.invalid_handle("GetThreadDescription")?,
};
// Looks like the default thread name is empty.
let name = this.get_thread_name(thread).unwrap_or(b"").to_owned();