forked from fte/fteqw
1
0
Fork 0

try to fix centerprint bug.

git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4696 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
Spoike 2014-06-23 16:18:00 +00:00
parent 9ec5f0007b
commit 1908310788
1 changed files with 3 additions and 3 deletions

View File

@ -1548,9 +1548,9 @@ int Font_LineBreaks(conchar_t *start, conchar_t *end, int maxpixelwidth, int max
// scan the width of the line
for (px=0, l=0 ; px <= maxpixelwidth; )
{
l++;
if (start+l >= end || (start[l-1]&(CON_CHARMASK|CON_HIDDEN)) == '\n')
if (start+l >= end || (start[l]&(CON_CHARMASK|CON_HIDDEN)) == '\n')
break;
l++;
px = Font_CharEndCoord(font, px, start[l]);
}
//if we did get to the end
@ -1576,7 +1576,7 @@ int Font_LineBreaks(conchar_t *start, conchar_t *end, int maxpixelwidth, int max
if (start == end)
break;
if ((*start&(CON_CHARMASK|CON_HIDDEN)) == '\n'||!l)
if ((*start&(CON_CHARMASK|CON_HIDDEN)) == '\n')
start++; // skip the \n
}