Rob Shearman : shell32: Fix the length calculation of the pidl in ILSaveToStream by using the helper function ILGetSize .
Alexandre Julliard
julliard at winehq.org
Mon Nov 12 06:27:41 CST 2007
Module: wine
Branch: master
Commit: 1a67b1f53e442e72c8f72e81e5d056188c30fadd
URL: http://source.winehq.org/git/wine.git/?a=commit;h=1a67b1f53e442e72c8f72e81e5d056188c30fadd
Author: Rob Shearman <rob at codeweavers.com>
Date: Sun Nov 11 12:28:26 2007 +0000
shell32: Fix the length calculation of the pidl in ILSaveToStream by using the helper function ILGetSize.
---
dlls/shell32/pidl.c | 8 +-------
1 files changed, 1 insertions(+), 7 deletions(-)
diff --git a/dlls/shell32/pidl.c b/dlls/shell32/pidl.c
index bf15e05..6bb7738 100644
--- a/dlls/shell32/pidl.c
+++ b/dlls/shell32/pidl.c
@@ -341,7 +341,6 @@ HRESULT WINAPI ILLoadFromStream (IStream * pStream, LPITEMIDLIST * ppPidl)
*/
HRESULT WINAPI ILSaveToStream (IStream * pStream, LPCITEMIDLIST pPidl)
{
- LPCITEMIDLIST pidl;
WORD wLen = 0;
HRESULT ret = E_FAIL;
@@ -349,12 +348,7 @@ HRESULT WINAPI ILSaveToStream (IStream * pStream, LPCITEMIDLIST pPidl)
IStream_AddRef (pStream);
- pidl = pPidl;
- while (pidl->mkid.cb)
- {
- wLen += sizeof(WORD) + pidl->mkid.cb;
- pidl = ILGetNext(pidl);
- }
+ wLen = ILGetSize(pPidl);
if (SUCCEEDED(IStream_Write(pStream, (LPVOID)&wLen, 2, NULL)))
{
More information about the wine-cvs
mailing list