1
0
Fork 0
forked from fte/fteqw

valgrindiness

git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4774 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
Spoike 2014-10-21 17:12:02 +00:00
parent 7d47b32f74
commit ddb3a52987
2 changed files with 5 additions and 5 deletions

View file

@ -2024,7 +2024,7 @@ char *Con_CopyConsole(qboolean nomarkup, qboolean onlyiflink)
if (*cur == CON_LINKSTART)
break;
}
while (finalendoffset < con->selendline->length)
while (finalendoffset < l->length)
{
uc = (((conchar_t*)(l+1))[finalendoffset] & CON_CHARMASK);
if (uc != ' ' && uc != '\t' && ((conchar_t*)(l+1))[finalendoffset] != CON_LINKEND)
@ -2034,9 +2034,9 @@ char *Con_CopyConsole(qboolean nomarkup, qboolean onlyiflink)
}
}
}
//scan backwards to find any link enclosure
for(lend = cur; lend >= (conchar_t*)(l+1); lend--)
for(lend = cur-1; lend >= (conchar_t*)(l+1); lend--)
{
if (*lend == CON_LINKSTART)
{
@ -2051,7 +2051,7 @@ char *Con_CopyConsole(qboolean nomarkup, qboolean onlyiflink)
}
}
//scan forwards to find the end of the selected link
if (*cur == CON_LINKSTART)
if (l->length && *cur == CON_LINKSTART)
{
for(lend = (conchar_t*)(con->selendline+1) + finalendoffset; lend < (conchar_t*)(con->selendline+1) + con->selendline->length; lend++)
{

View file

@ -1570,8 +1570,8 @@ int Font_LineBreaks(conchar_t *start, conchar_t *end, int maxpixelwidth, int max
{
if (start+l >= end || (start[l]&(CON_CHARMASK|CON_HIDDEN)) == '\n')
break;
l++;
px = Font_CharEndCoord(font, px, start[l]);
l++;
}
//if we did get to the end
if (px > maxpixelwidth)