Fix for loop sign fix in r282112 for column = 0

llvm-svn: 282119
This commit is contained in:
Ed Maste 2016-09-21 22:36:51 +00:00
parent 24c073d1bb
commit 0509203952
1 changed files with 1 additions and 1 deletions

View File

@ -172,7 +172,7 @@ size_t SourceManager::DisplaySourceLinesWithLineNumbersUsingLastFile(
m_last_file_sp->GetLine(line, src_line);
return_value += s->Printf(" \t");
// Insert a space for every non-tab character in the source line.
for (size_t i = 0; i < column - 1 && i < src_line.length(); ++i)
for (size_t i = 0; i + 1 < column && i < src_line.length(); ++i)
return_value += s->PutChar(src_line[i] == '\t' ? '\t' : ' ');
// Now add the caret.
return_value += s->Printf("^\n");