http://bugs.winehq.org/show_bug.cgi?id=19839
--- Comment #9 from Juan Lang juan_lang@yahoo.com 2009-08-25 21:18:26 --- (In reply to comment #8)
If size (wParam in WM_GETTEXT message) is 2 then it only has room for 1 actual character and the terminating null terminator so the return value should be 1.
Yes, precisely. So, since size is _not_ greater than len (the length of infoPtr->parts[0].text), the else branch is taken, and size - 1 characters are copied to the output buffer, and size - 1 is returned. Make sense?