http://bugs.winehq.org/show_bug.cgi?id=19839
--- Comment #8 from LIGHTNING UK! lightning_uk@imgburn.com 2009-08-25 19:48:11 --- (In reply to comment #7)
No. I suppose I could have tested that as well, that is, what should it return when the buffer is 2 characters in length rather than 1, and the status bar text is longer than 1 character? I followed MSDN here.
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.
This is regardless of how long 'infoPtr->parts[0].text' is because only 1 character can be copied into buf - the terminating null isn't counted in the return value.
I'm sure we're reading MSDN the same way :)
This condition is impossible due to the if clause: len = strlenW (infoPtr->parts[0].text); if (size > len) { (snip) else { The else branch, which you're seeing, only gets run if size is NOT greater than the length of infoPtr->parts[0].text.
Ah ok, that makes sense with a little more context. :)