riched20: Do not call callback when no data needs to be flushed.

This commit is contained in:
Maarten Lankhorst 2011-02-09 18:49:37 +01:00 committed by Alexandre Julliard
parent 07cfce6edf
commit 1e758c5e8c
1 changed files with 2 additions and 2 deletions

View File

@ -54,7 +54,7 @@ ME_StreamOutFlush(ME_OutStream *pStream)
LONG nRemaining = 0;
EDITSTREAM *stream = pStream->stream;
do {
while (nStart < pStream->pos) {
TRACE("sending %u bytes\n", pStream->pos - nStart);
/* Some apps seem not to set *pcb unless a problem arises, relying
on initial random nWritten value, which is usually >STREAMOUT_BUFFER_SIZE */
@ -72,7 +72,7 @@ ME_StreamOutFlush(ME_OutStream *pStream)
return FALSE;
pStream->written += nWritten;
nStart += nWritten;
} while (nStart < pStream->pos);
}
pStream->pos = 0;
return TRUE;
}