- Fixed: The sidedef loader could allocate insufficient memory if a map

contained unused sidedefs.
- Fixed: Color control sequences were written to the log file. Since any
  entered console command contains such a sequence it was quite noticable.

SVN r208 (trunk)
This commit is contained in:
Christoph Oelckers 2006-06-21 15:40:42 +00:00
parent f356e356a0
commit 14765bf64b
3 changed files with 27 additions and 4 deletions

View File

@ -1,4 +1,8 @@
June 21, 2006 (Changes by Graf Zahl)
- Fixed: The sidedef loader could allocate insufficient memory if a map
contained unused sidedefs.
- Fixed: Color control sequences were written to the log file. Since any
entered console command contains such a sequence it was quite noticable.
- Fixed: The obituary code didn't use the attacker's name for kills caused
by other players.
- Fixed: PIT_StompThing never checked for COMPATF_NO_PASSMOBJ.

View File

@ -811,7 +811,27 @@ int PrintString (int printlevel, const char *outline)
if (Logfile)
{
fputs (outline, Logfile);
// Strip out any color escape sequences before writing to the log file
char * copy = new char[strlen(outline)+1];
const char * srcp = outline;
char * dstp = copy;
while (*srcp != 0)
{
if (*srcp!=0x1c)
{
*dstp++=*srcp++;
}
else
{
if (srcp[1]!=0) srcp+=2;
else break;
}
}
*dstp=0;
fputs (copy, Logfile);
delete [] copy;
//#ifdef _DEBUG
fflush (Logfile);
//#endif

View File

@ -2083,15 +2083,14 @@ void P_LoadSideDefs2 (MapData * map)
{
int i;
char name[9];
mapsidedef_t * msdf = new mapsidedef_t[numsides+1];
char * msdf = new char[map->Size(ML_SIDEDEFS)];
map->Read(ML_SIDEDEFS, msdf);
name[8] = 0;
for (i = 0; i < numsides; i++)
{
mapsidedef_t *msd = msdf + sidetemp[i].a.map;
mapsidedef_t *msd = ((mapsidedef_t*)msdf) + sidetemp[i].a.map;
side_t *sd = sides + i;
sector_t *sec;