valgrindiness
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4774 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
parent
7d47b32f74
commit
ddb3a52987
2 changed files with 5 additions and 5 deletions
|
@ -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)
|
||||
|
@ -2036,7 +2036,7 @@ 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++)
|
||||
{
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue