diff options
author | Seth Cantrell <seth.cantrell@gmail.com> | 2012-10-30 06:13:50 +0000 |
---|---|---|
committer | Seth Cantrell <seth.cantrell@gmail.com> | 2012-10-30 06:13:50 +0000 |
commit | c6a2f6e2dd16368f4a60178b5e20b63fcafb5481 (patch) | |
tree | 724e1b15bdb22b4e18f21c18d5e5144459691e24 /lib/Frontend/TextDiagnostic.cpp | |
parent | c39a2b0577e5b2160575f5c1a43c2569ce3059d8 (diff) |
fix calculation of end pointer
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167006 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Frontend/TextDiagnostic.cpp')
-rw-r--r-- | lib/Frontend/TextDiagnostic.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Frontend/TextDiagnostic.cpp b/lib/Frontend/TextDiagnostic.cpp index 598238860d..bbd96b91f5 100644 --- a/lib/Frontend/TextDiagnostic.cpp +++ b/lib/Frontend/TextDiagnostic.cpp @@ -127,7 +127,7 @@ printableTextForNextCharacter(StringRef SourceLine, size_t *i, unsigned char const *begin, *end; begin = reinterpret_cast<unsigned char const *>(&*(SourceLine.begin() + *i)); - end = begin + SourceLine.size(); + end = begin + (SourceLine.size() - *i); if (isLegalUTF8Sequence(begin, end)) { UTF32 c; |