RICHED20: invalidate all the text on bogus last selection (fix for bug 10439)

Alex Villacís Lasso a_villacis at
Fri Dec 7 23:31:10 CST 2007

When removing text, beginning and end offsets of last selection are not
inmediately updated. When calling ME_InvalidateSelection() in paint.c, the
values are clipped to the current length of the text. However, even after
clipping, the values are unusable for deciding which parts of the text should
be updated. The control can very well try to mark invalidated paragraphs past
the end of the last paragraph, triggering a null pointer access. The
RadDecay at bug #10439 crashes because of this.

The attached patch just ignores the values when one or both of them point
the length of the current text, and invalidates everything. Existing code
recalculates the new selection beginning and end anew.

Fixes bug #10439.

* Values of last selection beyond end of text are bogus and not worth
  correcting. Invalidate all the text in this case.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: wine-riched20-invalidate-all-on-bogus-lastselection.patch
Type: text/x-patch
Size: 2257 bytes
Desc: not available
Url : 

More information about the wine-patches mailing list