COMCTL32: Fix the TAB_ITEM_SIZE macro

Thomas Weidenmueller wine-patches at reactsoft.com
Sat Jan 27 07:27:38 CST 2007


Make the TAB_ITEM_SIZE macro more portable across platforms.

- Thomas
-------------- next part --------------
Index: dlls/comctl32/tab.c
===================================================================
RCS file: /home/wine/wine/dlls/comctl32/tab.c,v
retrieving revision 1.129
diff -u -r1.129 tab.c
--- dlls/comctl32/tab.c	25 Oct 2006 18:31:19 -0000	1.129
+++ dlls/comctl32/tab.c	27 Jan 2007 13:25:20 -0000
@@ -96,7 +96,7 @@
 } TAB_ITEM;
 
 /* The size of a tab item depends on how much extra data is requested */
-#define TAB_ITEM_SIZE(infoPtr) (sizeof(TAB_ITEM) - sizeof(BYTE) + infoPtr->cbInfo)
+#define TAB_ITEM_SIZE(infoPtr) (FIELD_OFFSET(TAB_ITEM, extra[(infoPtr)->cbInfo]))
 
 typedef struct
 {


More information about the wine-patches mailing list