ddraw: Return appropriate value for non matching 32 bit pixel format in PixelFormat_DD2WineD3D (coverity)

Frédéric Delanoy frederic.delanoy at gmail.com
Fri Nov 23 12:36:14 CST 2012


More precisely, the WINED3DFMT_UNKNOWN was already returned as a fall-through, but a spurious message was output in that case.

CID 502304
---
 dlls/ddraw/utils.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/dlls/ddraw/utils.c b/dlls/ddraw/utils.c
index d990440..1964452 100644
--- a/dlls/ddraw/utils.c
+++ b/dlls/ddraw/utils.c
@@ -446,6 +446,7 @@ enum wined3d_format_id PixelFormat_DD2WineD3D(const DDPIXELFORMAT *DDPixelFormat
 
                 }
                 WARN("32 bit RGB pixel format does not match.\n");
+                return WINED3DFMT_UNKNOWN;
 
             default:
                 WARN("Invalid dwRGBBitCount in Pixelformat structure.\n");
-- 
1.8.0




More information about the wine-patches mailing list