Commit 1ceb883e authored by Damien Fouilleul's avatar Damien Fouilleul

plugin.cpp: formatting cleanup

vlccontrol.cpp: fixed a bug when processing target options stored in a safe array, last element in array was never processed
parent 62ee2f9d
...@@ -559,12 +559,12 @@ HRESULT VLCPlugin::onLoad(void) ...@@ -559,12 +559,12 @@ HRESULT VLCPlugin::onLoad(void)
LPOLESTR base_url; LPOLESTR base_url;
if( SUCCEEDED(pContMoniker->GetDisplayName(pBC, NULL, &base_url)) ) if( SUCCEEDED(pContMoniker->GetDisplayName(pBC, NULL, &base_url)) )
{ {
/* /*
** check that the moinker is in a URL ** check that the moniker name is a URL
*/ */
if( UrlIsW(base_url, URLIS_URL) ) if( UrlIsW(base_url, URLIS_URL) )
{ {
DWORD len = INTERNET_MAX_URL_LENGTH; DWORD len = INTERNET_MAX_URL_LENGTH;
LPOLESTR abs_url = (LPOLESTR)CoTaskMemAlloc(sizeof(OLECHAR)*len); LPOLESTR abs_url = (LPOLESTR)CoTaskMemAlloc(sizeof(OLECHAR)*len);
if( NULL != abs_url ) if( NULL != abs_url )
{ {
...@@ -665,9 +665,9 @@ HRESULT VLCPlugin::onAmbientChanged(LPUNKNOWN pContainer, DISPID dispID) ...@@ -665,9 +665,9 @@ HRESULT VLCPlugin::onAmbientChanged(LPUNKNOWN pContainer, DISPID dispID)
case DISPID_AMBIENT_TOPTOBOTTOM: case DISPID_AMBIENT_TOPTOBOTTOM:
break; break;
case DISPID_UNKNOWN: case DISPID_UNKNOWN:
/* /*
** multiple property change, look up the ones we are interested in ** multiple property change, look up the ones we are interested in
*/ */
VariantInit(&v); VariantInit(&v);
V_VT(&v) = VT_BOOL; V_VT(&v) = VT_BOOL;
if( SUCCEEDED(GetObjectProperty(pContainer, DISPID_AMBIENT_USERMODE, v)) ) if( SUCCEEDED(GetObjectProperty(pContainer, DISPID_AMBIENT_USERMODE, v)) )
......
...@@ -619,7 +619,7 @@ static HRESULT createTargetOptions(int codePage, VARIANT *options, char ***cOpti ...@@ -619,7 +619,7 @@ static HRESULT createTargetOptions(int codePage, VARIANT *options, char ***cOpti
SafeArrayGetUBound(array, 1, &uBound); SafeArrayGetUBound(array, 1, &uBound);
// have we got any options // have we got any options
if( uBound > lBound ) if( uBound >= lBound )
{ {
VARTYPE vType; VARTYPE vType;
hr = SafeArrayGetVartype(array, &vType); hr = SafeArrayGetVartype(array, &vType);
...@@ -636,7 +636,7 @@ static HRESULT createTargetOptions(int codePage, VARIANT *options, char ***cOpti ...@@ -636,7 +636,7 @@ static HRESULT createTargetOptions(int codePage, VARIANT *options, char ***cOpti
return E_OUTOFMEMORY; return E_OUTOFMEMORY;
ZeroMemory(*cOptions, sizeof(char *)*(uBound-lBound)); ZeroMemory(*cOptions, sizeof(char *)*(uBound-lBound));
for(pos=lBound; SUCCEEDED(hr) && (pos<uBound); ++pos ) for(pos=lBound; SUCCEEDED(hr) && (pos<=uBound); ++pos )
{ {
VARIANT option; VARIANT option;
hr = SafeArrayGetElement(array, &pos, &option); hr = SafeArrayGetElement(array, &pos, &option);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment