From e373f9ed97c3310f8a1550feac3a70da68a600e0 Mon Sep 17 00:00:00 2001 From: akocis Date: Fri, 27 Dec 2019 20:56:50 +0100 Subject: [PATCH] position: support line numbers larger than INT16_MAX (but <= UINT16_MAX) (#553) --- src/position.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/position.cc b/src/position.cc index c9dd2a30..2a440e8e 100644 --- a/src/position.cc +++ b/src/position.cc @@ -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(column, INT16_MAX)}; return !(p < start) && p < end;