attempt to fix extended code parsing
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@2167 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
parent
884dacd654
commit
2f2e0290b3
4 changed files with 4 additions and 4 deletions
|
@ -204,7 +204,7 @@ void CopyAndMarkup(conchar_t *dest, qbyte *src, int maxlength)
|
|||
}
|
||||
else if (*src == '&') // extended code
|
||||
{
|
||||
if (isextendedcode(*src+1) && isextendedcode(*src+2))
|
||||
if (isextendedcode(src[1]) && isextendedcode(src[2]))
|
||||
{
|
||||
src++; // foreground char
|
||||
if (*src == '-') // default for FG
|
||||
|
|
|
@ -85,7 +85,7 @@ extern conchar_t q3codemasks[MAXQ3COLOURS];
|
|||
|
||||
#define CON_TEXTSIZE 16384
|
||||
|
||||
#define isextendedcode(x) (((x) >= '0' && (x) <= '9') || ((x) >= 'A' && (x) <= 'F') || (x) == '-')
|
||||
#define isextendedcode(x) ((x >= '0' && x <= '9') || (x >= 'A' && x <= 'F') || x == '-')
|
||||
|
||||
typedef struct console_s
|
||||
{
|
||||
|
|
|
@ -355,7 +355,7 @@ void Sys_Printf (char *fmt, ...)
|
|||
}
|
||||
else if (*str == '&') // extended code
|
||||
{
|
||||
if (isextendedcode(*str+1) && isextendedcode(*str+2))
|
||||
if (isextendedcode(str[1]) && isextendedcode(str[2]))
|
||||
{
|
||||
str++; // foreground char
|
||||
if (*str == '-') // default for FG
|
||||
|
|
|
@ -563,7 +563,7 @@ void Sys_Printf (char *fmt, ...)
|
|||
}
|
||||
else if (*str == '&') // extended code
|
||||
{
|
||||
if (isextendedcode(*str+1) && isextendedcode(*str+2))
|
||||
if (isextendedcode(str[1]) && isextendedcode(str[2]))
|
||||
{
|
||||
str++; // foreground char
|
||||
if (*str == '-') // default for FG
|
||||
|
|
Loading…
Reference in a new issue