msi: Avoid accessing memory before the left hand string in compare_substring.
[wine] / include / d3dtypes.h
index 6670e71..21b9e74 100644 (file)
@@ -13,7 +13,7 @@
  *
  * You should have received a copy of the GNU Lesser General Public
  * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
  */
 
 /* FIXME: Need to add C++ code for certain structs for headers - this is going to be a problem
@@ -25,7 +25,9 @@
 #ifndef __WINE_D3DTYPES_H
 #define __WINE_D3DTYPES_H
 
-/* #include <windows.h> FIXME: Need to include for compatibility. Inclusion caused compile fail */
+#ifndef __WINESRC__
+# include <windows.h>
+#endif
 
 #include <float.h>
 #include <ddraw.h>
@@ -53,10 +55,10 @@ typedef LONG D3DFIXED;
 #define RGBA_MAKE(r, g, b, a)   ((D3DCOLOR) (((a) << 24) | ((r) << 16) | ((g) << 8) | (b)))
 
 #define D3DRGB(r, g, b) \
-    (0xff000000L | ( ((long)((r) * 255)) << 16) | (((long)((g) * 255)) << 8) | (long)((b) * 255))
+    (0xff000000 | ( ((LONG)((r) * 255)) << 16) | (((LONG)((g) * 255)) << 8) | (LONG)((b) * 255))
 #define D3DRGBA(r, g, b, a) \
-    (   (((long)((a) * 255)) << 24) | (((long)((r) * 255)) << 16) \
-    |   (((long)((g) * 255)) << 8) | (long)((b) * 255) \
+    (   (((LONG)((a) * 255)) << 24) | (((LONG)((r) * 255)) << 16) \
+    |   (((LONG)((g) * 255)) << 8) | (LONG)((b) * 255) \
     )
 
 #define RGB_GETRED(rgb)         (((rgb) >> 16) & 0xff)