- Fixed: The correct player class was not remembered when the menu had both

a player class selection menu and an episode menu.
- Fixed: AddToConsole could write outside its working buffer.
- Fixed: 0 was no longer recognized as placeholder for 'no state' in A_Chase.
- Fixed: When picking up weapons the code did not check if it should switch away
  from weak weapons.


SVN r1332 (trunk)
This commit is contained in:
Christoph Oelckers 2008-12-27 20:18:31 +00:00
commit 37d056c041
8 changed files with 73 additions and 16 deletions

View file

@ -667,7 +667,7 @@ void AddToConsole (int printlevel, const char *text)
}
len = (int)strlen (text);
size = len + 3;
size = len + 20;
if (addtype != NEWLINE)
{
@ -767,6 +767,15 @@ void AddToConsole (int printlevel, const char *text)
if (*work_p)
{
linestart = work_p - 1 - cc.Len();
if (linestart < work)
{
// The line start is outside the buffer.
// Make space for the newly inserted stuff.
size_t movesize = work-linestart;
memmove(work + movesize, work, strlen(work));
work_p += movesize;
linestart = work;
}
linestart[0] = TEXTCOLOR_ESCAPE;
strncpy (linestart + 1, cc, cc.Len());
}