24 Oct
2011
24 Oct
'11
1:03 p.m.
Thomas Faber <thfabba(a)gmx.de> writes:
Windows's version of GetTextExtentExPointW, which is called in that function, returns a value of 1 in this case (Wine's does not, which would appear to be a bug), leading to the "i<len" assertion failure if there is no text in the control. The patch fixes riched20 to correctly handle either behavior by adding a fast path for cx <= 0 (the function obviously needs to return 0 in the cx == 0 case too, so it can skip the calculation).
You should not be adding workarounds for Wine bugs, the bugs need to be fixed instead. -- Alexandre Julliard julliard(a)winehq.org