bug in while loop

This commit is contained in:
mes5k 2008-06-17 16:48:10 +00:00
parent 20d8d8b531
commit 9a32ab6294

View File

@ -248,10 +248,10 @@ inline void StdOutput::spacePrint( std::ostream& os,
// trim the length so it doesn't end in middle of a word
if ( stringLen == allowedLen )
while ( s[stringLen+start] != ' ' &&
while ( stringLen >= 0 &&
s[stringLen+start] != ' ' &&
s[stringLen+start] != ',' &&
s[stringLen+start] != '|' &&
stringLen >= 0 )
s[stringLen+start] != '|' )
stringLen--;
// ok, the word is longer than the line, so just split