Skip to content

Commit

Permalink
position: support line numbers larger than INT16_MAX (but <= UINT16_M…
Browse files Browse the repository at this point in the history
…AX) (MaskRay#553)
  • Loading branch information
adizero authored and MaskRay committed Dec 28, 2019
1 parent 98f25b5 commit ed64919
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/position.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit ed64919

Please sign in to comment.