1
0
Fork 0
forked from fte/fteqw

While playing with the new server browser, I noticed that the funstrings counted a ^7 escape as a character space towards the limit, rather than the number of printed chars.

git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@2111 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
Spoike 2006-03-14 01:20:31 +00:00
parent 28bff4208d
commit fe79b40941

View file

@ -216,9 +216,6 @@ void Draw_FunStringLen(int x, int y, unsigned char *str, int len)
while(*str)
{
if (--len< 0)
break;
if (*str == '^')
{
str++;
@ -288,11 +285,17 @@ void Draw_FunStringLen(int x, int y, unsigned char *str, int len)
}
else if (*str == '^')
{
if (--len< 0)
break;
Draw_ColouredCharacter(x, y, '^' | ext);
str++;
}
else
{
if (--len< 0)
break;
if (--len< 0)
break;
Draw_ColouredCharacter(x, y, '^' | ext);
x += 8;
Draw_ColouredCharacter (x, y, (*str++) | ext);
@ -300,6 +303,8 @@ void Draw_FunStringLen(int x, int y, unsigned char *str, int len)
x += 8;
continue;
}
if (--len< 0)
break;
Draw_ColouredCharacter (x, y, (*str++) | ext);
x += 8;
}