windowscodecs: Fix uninitialized variable use in StreamOnMemory_Write.

This commit is contained in:
Vincent Povirk 2010-04-14 12:26:12 -05:00 committed by Alexandre Julliard
parent fd3ea78702
commit a924e54c94
1 changed files with 3 additions and 5 deletions

View File

@ -125,11 +125,9 @@ static HRESULT WINAPI StreamOnMemory_Write(IStream *iface,
hr = STG_E_MEDIUMFULL;
}
else {
if (cb) {
memcpy(This->pbMemory + This->dwCurPos, pv, cb);
This->dwCurPos += cb;
hr = S_OK;
}
memcpy(This->pbMemory + This->dwCurPos, pv, cb);
This->dwCurPos += cb;
hr = S_OK;
if (pcbWritten) *pcbWritten = cb;
}
LeaveCriticalSection(&This->lock);