RICHED32: fix regression in WM_GETTEXTLENGTH on richedit 1.0 emulation (fixes bug #10716)

Alex Villací­s Lasso a_villacis at palosanto.com
Tue Dec 11 15:02:54 CST 2007


Commit f945f16de201dbd834da10701025665bfa8f05ee introduced a regression 
in richedit 1.0 emulation, in which WM_GETTEXTLENGTH reports a length 
that is too long. Due to the way the text is represented in memory, the 
previous behavior (not counting CR->CRLF conversions) was actually 
correct for a richedit 1.0 control, because the offset markers at the 
start of each paragraph already include previous CRLF lengths. The 
attached patch fixes it by using the GTL_USECRLF only for richedit 2.0. 
Also included is a test for the behavior in riched32 so this does not 
happen again.

Changelog:
* Fix regression of overlong text length reporting by WM_GETTEXTLENGTH 
in richedit 1.0 emulation.
* Test for fixed behavior

-- 
perl -e '$x=2.4;print sprintf("%.0f + %.0f = %.0f\n",$x,$x,$x+$x);'

-------------- next part --------------
A non-text attachment was scrubbed...
Name: wine-riched20-fix-riched32-WM_GETTEXTLENGTH-regression.patch
Type: text/x-patch
Size: 2008 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-patches/attachments/20071211/7997c89b/attachment.bin 


More information about the wine-patches mailing list