[2/3] oleaut32: return correct error code

Kirill K. Smirnov lich at math.spbu.ru
Thu Oct 16 04:20:54 CDT 2008


This fixes bug #15624
-------------- next part --------------
diff --git a/dlls/oleaut32/olepicture.c b/dlls/oleaut32/olepicture.c
index ce6ad16..4b45779 100644
--- a/dlls/oleaut32/olepicture.c
+++ b/dlls/oleaut32/olepicture.c
@@ -1802,7 +1802,7 @@ static HRESULT WINAPI OLEPictureImpl_Load(IPersistStream* iface,IStream*pStm) {
       hr=IStream_Read(pStm,header,8,&xread);
       if (hr || xread!=8) {
           ERR("Failure while reading picture header (hr is %x, nread is %d).\n",hr,xread);
-          return hr;
+          return (hr?hr:E_FAIL);
       }
       headerread += xread;
       xread = 0;


More information about the wine-patches mailing list