diff options
author | chriseth <chris@ethereum.org> | 2019-01-22 20:49:41 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-01-22 20:49:41 +0800 |
commit | 10d17f245839f208ec5085309022a32cd2502f55 (patch) | |
tree | b2c9f68980d0d418cd6f511e9f3f3f71369abe25 /liblangutil/SourceReferenceExtractor.cpp | |
parent | 1df8f40cd2fd7b47698d847907b8ca7b47eb488d (diff) | |
parent | 0ecafe032a84cb6960545dd7f18733430c1f782d (diff) | |
download | dexon-solidity-10d17f245839f208ec5085309022a32cd2502f55.tar dexon-solidity-10d17f245839f208ec5085309022a32cd2502f55.tar.gz dexon-solidity-10d17f245839f208ec5085309022a32cd2502f55.tar.bz2 dexon-solidity-10d17f245839f208ec5085309022a32cd2502f55.tar.lz dexon-solidity-10d17f245839f208ec5085309022a32cd2502f55.tar.xz dexon-solidity-10d17f245839f208ec5085309022a32cd2502f55.tar.zst dexon-solidity-10d17f245839f208ec5085309022a32cd2502f55.zip |
Merge pull request #5836 from ethereum/develop
Merge develop into release for 0.5.3.
Diffstat (limited to 'liblangutil/SourceReferenceExtractor.cpp')
-rw-r--r-- | liblangutil/SourceReferenceExtractor.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/liblangutil/SourceReferenceExtractor.cpp b/liblangutil/SourceReferenceExtractor.cpp index 4502bb23..1a6dbdb3 100644 --- a/liblangutil/SourceReferenceExtractor.cpp +++ b/liblangutil/SourceReferenceExtractor.cpp @@ -58,7 +58,9 @@ SourceReference SourceReferenceExtractor::extract(SourceLocation const* _locatio int locationLength = isMultiline ? line.length() - start.column : end.column - start.column; if (locationLength > 150) { - line = line.substr(0, start.column + 35) + " ... " + line.substr(end.column - 35); + int const lhs = start.column + 35; + int const rhs = (isMultiline ? line.length() : end.column) - 35; + line = line.substr(0, lhs) + " ... " + line.substr(rhs); end.column = start.column + 75; locationLength = 75; } |