[4/4] richedit: Fixed a bug preventing NULL pointers from being in text.
dylan.ah.smith at gmail.com
Tue May 13 18:11:07 CDT 2008
Opening a text file with a NULL terminated character in it was causing
an assertion error after a run was being split due to
word wrap. Windows allows NULL terminated characters to be in the text.
The fix was made by using the length of the run when splitting it
rather than searching for the NULL terminating character
at the end of the string. Similarly a fix was added to ensure that
WM_GETTEXT returned the correct length.
A test was added to prevent regressions, and shows that the behaviour
is now consistent with Windows.
dlls/riched20/editor.c | 2 +-
dlls/riched20/string.c | 2 +-
dlls/riched20/tests/editor.c | 44 ++++++++++++++++++++++++++++++++++++++++++
3 files changed, 46 insertions(+), 2 deletions(-)
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 3590 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-patches/attachments/20080513/ea41e054/attachment.diff
More information about the wine-patches