http://bugs.winehq.org/show_bug.cgi?id=14827
Dylan Smith dylan.ah.smith@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |dylan.ah.smith@gmail.com
--- Comment #17 from Dylan Smith dylan.ah.smith@gmail.com 2009-04-23 20:55:04 --- (In reply to comment #9)
- Putting some debugging message inside richedit20 code, I could see that the
problem arises only when this message gets printed :
fixme:richedit:ME_StreamOutFlush Invalid returned written size *pcb: 0x1e5 (485) instead of 460
The numbers can of course change. The callback function reads some more bytes than asked ones and hangs somewhere.
I don't have AutoCAD 2005 to test, so I can will make a guess as to why the callback function may read more bytes than the amount written. The callback may be looking for a NULL byte to determine the amount of bytes written, instead of looking at the using the cb value.
Try making the following change to add the NULL byte that native richedit controls include, and see if the fixme message still gets printed for the *pcd value.
diff --git a/dlls/riched20/writer.c b/dlls/riched20/writer.c index d1d9990..17134b4 100644 --- a/dlls/riched20/writer.c +++ b/dlls/riched20/writer.c @@ -904,7 +904,7 @@ ME_StreamOutRTF(ME_TextEditor *editor, ME_OutStream *pStream, int nStart, int nC break; p = ME_FindItemFwd(p, diRunOrParagraphOrEnd); } - if (!ME_StreamOutPrint(pStream, "}")) + if (!ME_StreamOutPrint(pStream, "}\0")) return FALSE; return TRUE; }