Browse Source
NumericUpDown.Value is a decimal?, so changing it while a UI Automation client is attached raised an automation property-changed event whose boxed decimal hit no case in ComVariant.Create and threw an unhandled ArgumentException that crashed the process. The event only fires when a UIA client is listening, so it reproduced only on "some machines". Mirror the BCL System.Runtime.InteropServices.Marshalling.ComVariant (which this type is based on): overlay a decimal field on the variant, write it before setting the VT_DECIMAL discriminator in Create (the discriminator overlaps the decimal's unused leading bytes), and clear that discriminator on a copy before reading the value back in AsObject. Fixes #21491pull/21641/head
committed by
GitHub
1 changed files with 32 additions and 0 deletions
Loading…
Reference in new issue