diff mm7_6.cpp @ 1165:29a8defbad9e

temporary _CRT_SECURE_NO_WARNINGS to remove some warnings removed double LOBYTE, LOWORD etd macro definitions swprintf called with string size parameter ErrD3D with too many params fix 1 or 2 other minor fixes
author Grumpy7
date Tue, 04 Jun 2013 03:21:21 +0200
parents 502b8b2e36b4
children 15ad868d972f
line wrap: on
line diff
--- a/mm7_6.cpp	Tue Jun 04 02:03:43 2013 +0200
+++ b/mm7_6.cpp	Tue Jun 04 03:21:21 2013 +0200
@@ -1,3 +1,7 @@
+#ifdef _MSC_VER
+#define _CRT_SECURE_NO_WARNINGS
+#endif
+
 #include "MM7.h"
 
 
@@ -6479,7 +6483,7 @@
 
 const wchar_t *UIMessage2String(UIMessageType msg)
 {
-  #define CASE(xxx) case xxx: _swprintf(b, L"%03X/%s", msg, L#xxx); return b;
+  #define CASE(xxx) case xxx: swprintf(b, wcslen(L"%03X/%s"), L"%03X/%s", msg, L#xxx); return b;
   static wchar_t b[256]; // bad for threads
   switch (msg)
   {
@@ -6570,7 +6574,7 @@
     CASE(UIMSG_ToggleColoredLights)
     CASE(UIMSG_ToggleTint)
     default:
-      _swprintf(b, L"UIMSG_%03X", msg); return b;
+      swprintf(b, wcslen(L"UIMSG_%03X") , L"UIMSG_%03X", msg); return b;
   };
   #undef CASE
 }