From: Ed Maste Date: Wed, 21 Sep 2016 22:36:51 +0000 (+0000) Subject: Fix for loop sign fix in r282112 for column = 0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0509203952fa0e6c1073dab2d9cce1e3beabab9f;p=platform%2Fupstream%2Fllvm.git Fix for loop sign fix in r282112 for column = 0 llvm-svn: 282119 --- diff --git a/lldb/source/Core/SourceManager.cpp b/lldb/source/Core/SourceManager.cpp index b7b8dfb..648d20b 100644 --- a/lldb/source/Core/SourceManager.cpp +++ b/lldb/source/Core/SourceManager.cpp @@ -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");