mirror of
https://github.com/MaskRay/ccls.git
synced 2024-11-21 23:25:07 +00:00
position: support line numbers larger than INT16_MAX (but <= UINT16_MAX) (#553)
This commit is contained in:
parent
a2ecd9a8f0
commit
e373f9ed97
@ -47,7 +47,7 @@ Range Range::fromString(const std::string &encoded) {
|
||||
}
|
||||
|
||||
bool Range::contains(int line, int column) const {
|
||||
if (line > INT16_MAX)
|
||||
if (line > UINT16_MAX)
|
||||
return false;
|
||||
Pos p{(uint16_t)line, (int16_t)std::min<int>(column, INT16_MAX)};
|
||||
return !(p < start) && p < end;
|
||||
|
Loading…
Reference in New Issue
Block a user