From 831b7d926399e7a03b077bea003c6a13eb6b559a Mon Sep 17 00:00:00 2001 From: Vincent Povirk Date: Wed, 2 Dec 2009 11:31:43 -0600 Subject: [PATCH 2/5] ole32: Check the current storage for STGM_SIMPLE rather than ancestorStorage. Since simple mode does not support substorages, we know these are the same. --- dlls/ole32/stg_stream.c | 4 ++-- dlls/ole32/storage32.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dlls/ole32/stg_stream.c b/dlls/ole32/stg_stream.c index 332ee8a..60cbb88 100644 --- a/dlls/ole32/stg_stream.c +++ b/dlls/ole32/stg_stream.c @@ -575,7 +575,7 @@ static HRESULT WINAPI StgStreamImpl_SetSize( } /* In simple mode keep the stream size above the small block limit */ - if (This->parentStorage->ancestorStorage->base.openFlags & STGM_SIMPLE) + if (This->parentStorage->openFlags & STGM_SIMPLE) libNewSize.u.LowPart = max(libNewSize.u.LowPart, LIMIT_TO_USE_SMALL_BLOCK); if (This->streamSize.u.LowPart == libNewSize.u.LowPart) @@ -868,7 +868,7 @@ static HRESULT WINAPI StgStreamImpl_Stat( pstatstg->grfMode = This->grfMode; /* In simple create mode cbSize is the current pos */ - if((root->base.openFlags & STGM_SIMPLE) && root->create) + if((This->parentStorage->openFlags & STGM_SIMPLE) && root->create) pstatstg->cbSize = This->currentPosition; return S_OK; diff --git a/dlls/ole32/storage32.c b/dlls/ole32/storage32.c index 3991b9e..e7a8c73 100644 --- a/dlls/ole32/storage32.c +++ b/dlls/ole32/storage32.c @@ -866,7 +866,7 @@ static HRESULT WINAPI StorageBaseImpl_CreateStream( return STG_E_ACCESSDENIED; } - if(This->ancestorStorage->base.openFlags & STGM_SIMPLE) + if(This->openFlags & STGM_SIMPLE) if(grfMode & STGM_CREATE) return STG_E_INVALIDFLAG; *ppstm = 0; -- 1.6.3.3