[svn] Fixed test malloc.
--- a/testparse.c Thu Mar 27 22:59:38 2008 -0400
+++ b/testparse.c Thu Mar 27 23:06:57 2008 -0400
@@ -3,7 +3,7 @@
#include "mojoshader.h"
-#if DEBUG_MALLOC
+#if MOJOSHADER_DEBUG_MALLOC
static void *Malloc(int len)
{
void *ptr = malloc(len + sizeof (int));
@@ -17,9 +17,8 @@
static void Free(void *_ptr)
{
- int *ptr = (((int *) ptr) - 1);
- int *store = (int *) ptr;
- int len = *store;
+ int *ptr = (((int *) _ptr) - 1);
+ int len = *ptr;
printf("free() %d bytes (%p)\n", len, ptr);
free(ptr);
} // Free