[2/2] richedit: Avoided testing for undocumented behaviour causing test to fail.

Dylan Smith dylan.ah.smith at gmail.com
Thu Oct 2 16:33:33 CDT 2008

The test for EM_GETLINE was testing to make sure the null terminating
character was written at the end of the text as long as the buffer was
long enough, and also tested to make sure that no other bytes were
written after this null terminating character.  This is consistent with
Windows 2000 and up, but not for previous versions of Windows.

According to MSDN, the null terminating character is only written if no
text is copied, so I only tested for the text that is copied from the
line, and the bytes after the declared buffer size to catch any buffer
overflows.  Any bytes in between will be ignored since they are all
implementation dependant.

The only reason for testing for the implementation differences is if it
breaks an application. There is no evidence of this since before my
changes, the whole test came from a single commit that also implemented
 dlls/riched20/tests/editor.c |   21 ++++++++++++++++-----
 1 files changed, 16 insertions(+), 5 deletions(-)
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: 0002-richedit-Fixed-failure-from-testing-for-undocume.diff.txt
Url: http://www.winehq.org/pipermail/wine-patches/attachments/20081002/6657b4a6/attachment.txt 

More information about the wine-patches mailing list