- Merged a lot of these static destructor-only structs into regular

functions added to the exit chain with atterm so that they can be called
  in a deterministic order and not whatever order the linker decides to put
  them in.
- Fixed: DCajunMaster did not free its getspawned.
- Fixed: P_FreeLevelData() did not free ACS scripts.
- Fixed: Level snapshots were not freed at exit.
- Fixed: The save/load menu list was not freed at exit.
- Fixed: FCompressedMemFile needs a destructor to free the m_ImplodedBuffer.
- Fixed: G_DoLoadGame() did not free the engine string.
- Fixed: M_ReadSaveStrings() did not free the engine string.
- Fixed: Processing DEM_SAVEGAME did not free the pathname string.
- Added a check for truncated flats to FFlatTexture::MakeTexture() because
  Heretic's F_SKY1 is only four bytes long.
- Added a dump of the offending state to the "Cannot find state..." diagnostic.
- Fixed: FCompressedFile did not initialize m_Mode in its default constructor.
- Fixed: Heretic and Hexen status bars did not initialize ArtiRefresh.
- Fixed: PNGHandle destructor should use delete[] to free TextChunks.


SVN r111 (trunk)
This commit is contained in:
Randy Heit 2006-05-12 03:14:40 +00:00
commit 8fcf93d65a
68 changed files with 866 additions and 485 deletions

View file

@ -1623,7 +1623,7 @@ void G_DoLoadGame ()
// Check whether this savegame actually has been created by a compatible engine.
// Since there are ZDoom derivates using the exact same savegame format but
// with mutual incompatibilities this check simplifies things significantly.
char * engine = M_GetPNGText (png, "Engine");
char *engine = M_GetPNGText (png, "Engine");
if (engine == NULL || 0 != strcmp (engine, GAMESIG))
{
// Make a special case for the message printed for old savegames that don't
@ -1634,12 +1634,17 @@ void G_DoLoadGame ()
}
else
{
Printf ("Savegame is from another ZDoom-based engine\n");
Printf ("Savegame is from another ZDoom-based engine: %s\n", engine);
delete[] engine;
}
delete png;
fclose (stdfile);
return;
}
if (engine != NULL)
{
delete[] engine;
}
if (!M_GetPNGText (png, "ZDoom Save Version", sigcheck, 16) ||
0 != strncmp (sigcheck, SAVESIG, 9) || // ZDOOMSAVE is the first 9 chars