oleaut32: Clarify cast operation (PVS-Studio)

Michael Stefaniuc mstefani at redhat.de
Mon Oct 27 14:01:37 CDT 2014


---
arraydesc_seg.len is the length in bytes and offs the initial
arraydesc_seg.len


 dlls/oleaut32/typelib.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dlls/oleaut32/typelib.c b/dlls/oleaut32/typelib.c
index 48b171b..00f5043 100644
--- a/dlls/oleaut32/typelib.c
+++ b/dlls/oleaut32/typelib.c
@@ -9144,7 +9144,7 @@ static DWORD WMSFT_append_arraydesc(ARRAYDESC *desc, WMSFT_TLBFile *file)
         file->arraydesc_seg.data = heap_alloc(file->arraydesc_seg.len);
     else
         file->arraydesc_seg.data = heap_realloc(file->arraydesc_seg.data, file->arraydesc_seg.len);
-    encoded = (DWORD*)((char *)file->arraydesc_seg.data) + offs;
+    encoded = (DWORD*)((char *)file->arraydesc_seg.data + offs);
 
     encoded[0] = WMSFT_append_typedesc(&desc->tdescElem, file, NULL, NULL);
     encoded[1] = desc->cDims | ((desc->cDims * 2 * sizeof(DWORD)) << 16);
-- 
1.8.3.1



More information about the wine-patches mailing list