aboutsummaryrefslogtreecommitdiff
path: root/src/StormCommon.h
diff options
context:
space:
mode:
authorunknown <E:\Ladik\Mail>2015-04-01 06:52:50 +0200
committerunknown <E:\Ladik\Mail>2015-04-01 06:52:50 +0200
commit93370897471cb7bff861f9e961ff36e6ce46a5e8 (patch)
tree2e650adc65630f70a76afe4f4e7647849c2ce5b2 /src/StormCommon.h
parente5b9f5132a9010a36db81788e10bb1be07ccf410 (diff)
+ Better handling of MPQs corrupted by yet another silly MPQ protector
Diffstat (limited to 'src/StormCommon.h')
-rw-r--r--src/StormCommon.h14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/StormCommon.h b/src/StormCommon.h
index 93193cf..00ea3d8 100644
--- a/src/StormCommon.h
+++ b/src/StormCommon.h
@@ -105,17 +105,17 @@ typedef struct _MPQ_SIGNATURE_INFO
// - Memory freeing function doesn't have to test the pointer to NULL
//
-//#if defined(_MSC_VER) && defined(_DEBUG)
-//
-//#define STORM_ALLOC(type, nitems) (type *)HeapAlloc(GetProcessHeap(), 0, ((nitems) * sizeof(type)))
-//#define STORM_FREE(ptr) HeapFree(GetProcessHeap(), 0, ptr)
-//
-//#else
+#if defined(_MSC_VER) && defined(_DEBUG)
+
+#define STORM_ALLOC(type, nitems) (type *)HeapAlloc(GetProcessHeap(), 0, ((nitems) * sizeof(type)))
+#define STORM_FREE(ptr) HeapFree(GetProcessHeap(), 0, ptr)
+
+#else
#define STORM_ALLOC(type, nitems) (type *)malloc((nitems) * sizeof(type))
#define STORM_FREE(ptr) free(ptr)
-//#endif
+#endif
//-----------------------------------------------------------------------------
// StormLib internal global variables