riched20: Prevent setting an invalid default format rect
thfabba at gmx.de
Sat Oct 15 05:10:57 CDT 2011
Many applications (e.g. mIRC 7.19) create richedit controls with zero or
almost-zero width/height. The ME_SetDefaultFormatRect function does not
take this into account when calculating the format rect, and will create
and invalid rectangle (left > right or similar) in this case, which is
then be passed on to several other functions, and results in negative
values for "available width" fields considered when doing wrapping
This will for instance lead to an assertion failure when Wine's
riched20.dll is used on Windows .
The patch fixes this by adding checks to ME_SetDefaultFormatRect to
use the minimal rectangle that is still valid in this case.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
More information about the wine-patches