http://bugs.winehq.org/show_bug.cgi?id=19839
--- Comment #7 from Juan Lang juan_lang@yahoo.com 2009-08-25 19:35:48 --- (In reply to comment #6)
I haven't looked at anything except your patch (i.e no actual source code) but wouldn't you simply have to 'return 0;' rather than 'return -1' ?
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.
The bit in your patch where you memcpy looks like it could cause its own access violation if 'size' is larger than the length of 'infoPtr->parts[0].text' - no ?
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.