Fix the free macro for gdb/mingw
This commit is contained in:
parent
486142cd87
commit
25c2673323
2 changed files with 4 additions and 4 deletions
src
|
@ -100,9 +100,10 @@
|
|||
|
||||
#endif
|
||||
|
||||
#ifdef WIN32
|
||||
#if defined(WIN32) && defined(DEBUG)
|
||||
// GDB + MINGW doesn't like free(0)
|
||||
#include <stdlib.h>
|
||||
#define free(x) do { if( (x) ) free(x); } while(0)
|
||||
#define free(x) do { void* __x; __x=(x); if( __x ) free( __x ); } while(0)
|
||||
#endif
|
||||
|
||||
#endif // } __GNUC__
|
||||
|
|
|
@ -127,8 +127,7 @@ global void CleanPlayers(void)
|
|||
//
|
||||
if( (ptr=RaceWcNames) ) { // Free all old names
|
||||
while( *ptr ) {
|
||||
free(*ptr);
|
||||
ptr++;
|
||||
free(*ptr++);
|
||||
}
|
||||
free(RaceWcNames);
|
||||
RaceWcNames=NULL;
|
||||
|
|
Loading…
Add table
Reference in a new issue