Thomas Faber thfabba@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.