RICHED20: EM_SETCHARFORMAT must return 0, not assert, on invalid struct size (try 3)

a_villacis at palosanto.com a_villacis at palosanto.com
Wed Sep 26 12:58:24 CDT 2007


> a_villacis at palosanto.com writes:
>
>> I considered doing this at first, but ME_ToCF2W is used in three other
>> places beside handling EM_SETCHARFORMAT (all in style.c), and those
>> places
>> might get a null-pointer exception instead of an assert if something
>> went
>> wrong.
>
> A null-pointer exception serves the same purpose as an assert, and
> they both result in a debugger backtrace, so there's no reason to add
> more asserts here.
>
> --
> Alexandre Julliard
> julliard at winehq.org
>
>

Now without new asserts.

Changelog:
* EM_SETCHARFORMAT must not assert on invalid structure size. Instead,
  it should just fail and return 0.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: wine-riched20-EM_SETCHARFORMAT-no-assert-try3.patch
Type: text/x-patch
Size: 4616 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-patches/attachments/20070926/2087a63d/attachment.bin 


More information about the wine-patches mailing list