Skip to content

Commit cc7d5d6

Browse files
committed
- fix funcname
1 parent 685cee7 commit cc7d5d6

3 files changed

Lines changed: 5 additions & 5 deletions

File tree

src_rebuild/Game/C/civ_ai.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ int test555 = 0;
7878

7979
#ifdef _DEBUG
8080
#define CIV_STATE_SET_CONFUSED(cp) \
81-
printInfo("CIV confused: at %s, %d\n", __FUNCTION__, __LINE__);\
81+
printInfo("CIV confused: at %s, %d\n", FUNCNAME, __LINE__);\
8282
cp->ai.c.thrustState = 3; cp->ai.c.ctrlState = 7;
8383
#else
8484
#define CIV_STATE_SET_CONFUSED(cp) \

src_rebuild/Game/C/system.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ volatile char* _replay_buffer = NULL; // 0x1FABBC
5858

5959
#if defined(USE_CRT_MALLOC)
6060

61-
char* mallocptr = NULL;
61+
volatile char* mallocptr = NULL;
6262
volatile char* malloctab = NULL;
6363

6464
void* g_dynamicAllocs[1024] = { 0 };

src_rebuild/Game/C/system.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ extern void sys_freeall();
5959
#define D_TEMPALLOC(size) sys_tempalloc(size)
6060

6161
#ifdef _DEBUG
62-
#define D_MALLOC(size) sys_malloc(size, __FUNCTION__, __LINE__)
62+
#define D_MALLOC(size) sys_malloc(size, FUNCNAME, __LINE__)
6363

6464
#else
6565
#define D_MALLOC(size) sys_malloc(size, NULL, 0)
@@ -85,13 +85,13 @@ extern void sys_freeall();
8585
#define D_MALLOC_END() \
8686
D_TEMPFREE();\
8787
if(mallocptr > _oldmalloc)\
88-
DMalloc_DebugPrint("malloc(%d) in %s, line %d. Malloc usage: %d\n", mallocptr-_oldmalloc, __FUNCTION__, __LINE__, (mallocptr-malloctab));\
88+
DMalloc_DebugPrint("malloc(%d) in %s, line %d. Malloc usage: %d\n", mallocptr-_oldmalloc, FUNCNAME, __LINE__, (mallocptr-malloctab));\
8989
} // D_MALLOC_BEGIN block
9090
#else
9191
#define D_MALLOC_END() \
9292
D_TEMPFREE();\
9393
if(mallocptr > _oldmalloc)\
94-
DMalloc_DebugPrint("malloc(%d) in " __FUNCTION__ ", line %d. Malloc usage: %d\n", mallocptr-_oldmalloc, __LINE__, (mallocptr-malloctab));\
94+
DMalloc_DebugPrint("malloc(%d) in " FUNCNAME ", line %d. Malloc usage: %d\n", mallocptr-_oldmalloc, __LINE__, (mallocptr-malloctab));\
9595
} // D_MALLOC_BEGIN block
9696
#endif
9797

0 commit comments

Comments
 (0)