Fix out of bounds read.

git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@3533 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
Mark Olsen 2010-05-17 01:57:30 +00:00
parent 4c9a4f06e1
commit 03cb51a236

View file

@ -1058,7 +1058,7 @@ static int Con_LineBreaks(conchar_t *start, conchar_t *end, int scrwidth, int ma
// for (l=0 ; l<40 && *start && *start != '\n'; l++)
// start++;
if ((*start&CON_CHARMASK) == '\n'||!l)
if (start < end && (*start&CON_CHARMASK) == '\n'||!l)
start++; // skip the \n
}