- Fixed AInventory::PickupFlash setting with GCC.
- Fixed: The MusicVolumes list was allocated with M_Malloc but freed with delete. - Fixed: demobuffer was inconsistantly handled with new[]/delete[] and malloc/free. - Added used memory tracking to M_Malloc() and M_Realloc(). This necessitated the addition of an M_Free() call to track frees. - Removed M_Calloc since it was only used in one place, and can just as well be done with an M_Malloc/memset pair. - Bumped DEMOGAMEVERSION for the new net controller codes. SVN r751 (trunk)
This commit is contained in:
parent
39bff11693
commit
133350fb9c
29 changed files with 182 additions and 98 deletions
|
|
@ -2436,7 +2436,7 @@ bool G_ProcessIFFDemo (char *mapname)
|
|||
delete[] uncompressed;
|
||||
return true;
|
||||
}
|
||||
delete[] demobuffer;
|
||||
M_Free (demobuffer);
|
||||
zdembodyend = uncompressed + uncompSize;
|
||||
demobuffer = demo_p = uncompressed;
|
||||
}
|
||||
|
|
@ -2456,7 +2456,7 @@ void G_DoPlayDemo (void)
|
|||
if (demolump >= 0)
|
||||
{
|
||||
int demolen = Wads.LumpLength (demolump);
|
||||
demobuffer = new BYTE[demolen];
|
||||
demobuffer = (BYTE *)M_Malloc(demolen);
|
||||
Wads.ReadLump (demolump, demobuffer);
|
||||
}
|
||||
else
|
||||
|
|
@ -2547,7 +2547,7 @@ bool G_CheckDemoStatus (void)
|
|||
|
||||
C_RestoreCVars (); // [RH] Restore cvars demo might have changed
|
||||
|
||||
delete[] demobuffer;
|
||||
M_Free (demobuffer);
|
||||
demoplayback = false;
|
||||
netdemo = false;
|
||||
netgame = false;
|
||||
|
|
@ -2620,7 +2620,7 @@ bool G_CheckDemoStatus (void)
|
|||
WriteLong (demo_p - demobuffer - 8, &formlen);
|
||||
|
||||
M_WriteFile (demoname, demobuffer, demo_p - demobuffer);
|
||||
free (demobuffer);
|
||||
M_Free (demobuffer);
|
||||
demorecording = false;
|
||||
stoprecording = false;
|
||||
Printf ("Demo %s recorded\n", demoname);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue